Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Deploy docs

# Redeploys the docs site (website/) to production on Prisma Compute when the
# site or the guides it renders change on main. The guides are rendered into
# the bundle at build time, so a docs/guides/ edit needs a redeploy to reach
# the site.
#
# Credentials: repo secret CI_SITE_DEPLOY_TOKEN (the site's own deploy token,
# separate from the E2E workflow's PRISMA_SERVICE_TOKEN) and repo variable
# PRISMA_WORKSPACE_ID. The CLI reads the token from PRISMA_SERVICE_TOKEN, so
# the secret is mapped onto that name below.

on:
push:
branches: [main]
paths:
- 'website/**'
- 'docs/guides/**'
- '.github/workflows/deploy-docs.yml'
workflow_dispatch:

permissions:
contents: read

# Fixed group (not per-ref): only one real-cloud deploy of the docs runs at a
# time. cancel-in-progress stays false so a kill mid-deploy can't leave the
# stack half-applied — the deploy is idempotent, an interrupted one is not.
concurrency:
group: deploy-docs
cancel-in-progress: false

jobs:
deploy:
name: Build and deploy the docs site
runs-on: ubuntu-latest
timeout-minutes: 5
env:
PRISMA_SERVICE_TOKEN: ${{ secrets.CI_SITE_DEPLOY_TOKEN }}
PRISMA_WORKSPACE_ID: ${{ vars.PRISMA_WORKSPACE_ID }}
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
- uses: ./.github/actions/setup
- name: Install dependencies
run: pnpm install --frozen-lockfile
# Renders docs/guides/*.md into the bundle, then builds the entry.
# `prisma-composer deploy` never builds for you (ADR-0005).
- name: Build
run: pnpm turbo run build --filter composer-docs-website
# No --stage: this targets production. The CLI is invoked directly rather
# than through the package's `deploy` script, which sources a local .env
# that does not exist on a runner (the credentials are already in env).
- name: Deploy to production
working-directory: website
run: bun node_modules/.bin/prisma-composer deploy module.ts
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
node_modules
dist
dist-*

# Docs site content, rendered from docs/guides/ at build time (website/).
website/src/generated/
coverage
.prisma
*.log
Expand Down
10 changes: 5 additions & 5 deletions dependency-cruiser.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -189,17 +189,17 @@ const createSinkAndConsumerRules = () => {
forbidden.push({
name: 'examples-import-public-only',
comment:
'Examples and integration tests import only the 9-public packages (ADR-0028), so every example is an honest demo of what a user can write',
'Examples, the docs website, and integration tests import only the 9-public packages (ADR-0028), so every one is an honest demo of what a user can write',
severity: 'error',
from: { path: '^(examples|test)/' },
from: { path: '^(examples|website|test)/' },
to: { path: '^packages/(0-framework|1-prisma-cloud)/' },
});
forbidden.push({
name: 'packages-cannot-import-examples',
comment: 'packages/** cannot import from examples/** or test/**',
comment: 'packages/** cannot import from examples/**, website/**, or test/**',
severity: 'error',
from: { path: '^packages/' },
to: { path: '^(examples|test)/' },
to: { path: '^(examples|website|test)/' },
});
};

Expand All @@ -222,7 +222,7 @@ export default {
exportsFields: ['exports'],
conditionNames: ['import', 'require', 'node', 'default'],
},
includeOnly: '^(packages|examples|test)/',
includeOnly: '^(packages|examples|website|test)/',
exclude: {
// Tests inside packages are excluded (they legitimately cross plane
// boundaries); build tooling configs are excluded by NAME, deliberately
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"typecheck": "turbo run typecheck",
"clean": "turbo run clean",
"prepare": "husky && skills add prisma/skills --skill '*' --agent universal claude-code -y && skills add ./skills-contrib --skill '*' --agent universal claude-code -y && node scripts/sync-agent-rules.mjs",
"lint:deps": "depcruise --config dependency-cruiser.config.mjs packages examples test && node scripts/lint-publishable-location.mjs && node scripts/lint-framework-vocabulary.mjs"
"lint:deps": "depcruise --config dependency-cruiser.config.mjs packages examples test website && node scripts/lint-publishable-location.mjs && node scripts/lint-framework-vocabulary.mjs"
},
"devDependencies": {
"@biomejs/biome": "2.5.3",
Expand Down
Loading
Loading