Skip to content
Closed
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
59 changes: 59 additions & 0 deletions .github/workflows/production-deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Production deploy

on:
workflow_dispatch:
push:
branches:
- main
repository_dispatch:
types:
- microcms_update

permissions:
contents: read

concurrency:
group: production-deploy
cancel-in-progress: false

jobs:
deploy:
name: deploy
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Check out repository
uses: actions/checkout@v7
with:
persist-credentials: false

- name: Set up Node.js
uses: actions/setup-node@v7
with:
node-version: 22.14.0
cache: npm

- name: Install dependencies
run: npm ci

- name: Check formatting
run: npm run format:check

- name: Run lint
run: npm run lint

- name: Run tests
run: npm test

- name: Build production bundle
run: npm run build

- name: Check Cloudflare deployment bundle
run: npm run cloudflare:check

- name: Deploy to Cloudflare
env:
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
run: npx wrangler deploy
2 changes: 2 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,6 @@ Do not maintain a second product story in Web or add pre-rendered example SVGs.

Cloudflare configuration targets the `stack-web` Worker and publishes the combined Vite and VitePress output as static assets. Before a production deployment, run the complete build and dry-run checks, verify the exact Docs and Engine pins, and review the rendered Playground and all four documentation locales.

The `Production deploy` workflow deploys the latest `main` revision after a push to `main`, a manual dispatch from `main`, or a `repository_dispatch` event whose `event_type` is `microcms_update`. The deploy job repeats formatting, lint, test, build, and Cloudflare dry-run gates before publishing with Wrangler. Configure `CLOUDFLARE_ACCOUNT_ID` and `CLOUDFLARE_API_TOKEN` as GitHub Actions secrets; never put either value in the workflow or repository files.

Keep changes focused, use English commit and pull request descriptions, and do not commit credentials, tokens, customer data, signing material, build output, or fetched private resources.