docs(agents): re-measure the test counts, which had drifted before th… #175
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Deploy (Vercel) | |
| # Cross-account deploy. The Vercel team that hosts archlang-docs / archlang-playground | |
| # is linked to a *different* GitHub account than this repo, so Vercel's own Git | |
| # integration can't see this repo. Instead we deploy from CI with a Vercel token. | |
| # | |
| # The org/project IDs below are non-secret identifiers (useless without the token). | |
| # The ONLY secret required is VERCEL_TOKEN: | |
| # 1. Create it at https://vercel.com/account/settings/tokens with the she-sharp1 | |
| # scope (the team that owns the projects). | |
| # 2. Add it to this repo: Settings → Secrets and variables → Actions → | |
| # New repository secret → name: VERCEL_TOKEN. | |
| # Then push to main (or run this workflow manually) to deploy. | |
| # | |
| # Each project builds via its committed vercel.json (which builds the core first, | |
| # then the site) and deploys with `--prebuilt`, so the monorepo `cd ..` works on | |
| # the Linux runner where the whole repo is checked out. | |
| on: | |
| push: | |
| branches: [main] | |
| workflow_dispatch: | |
| concurrency: | |
| group: vercel-deploy-${{ github.ref }} | |
| cancel-in-progress: false | |
| permissions: | |
| contents: read | |
| jobs: | |
| deploy: | |
| name: Deploy ${{ matrix.name }} | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - name: docs | |
| dir: docs-site | |
| project_id: prj_BQBn15EITtFL5hw4bGBcEBm6gb91 | |
| url: https://archlang.uk | |
| - name: playground | |
| dir: playground | |
| project_id: prj_fKCyuxicxftbsIqgh6M7AxBAwEE0 | |
| url: https://playground.archlang.uk | |
| env: | |
| VERCEL_ORG_ID: team_B067BUpWFoVPBxfQ0TWllunK | |
| VERCEL_PROJECT_ID: ${{ matrix.project_id }} | |
| VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }} | |
| steps: | |
| - name: Check VERCEL_TOKEN is set | |
| run: | | |
| if [ -z "$VERCEL_TOKEN" ]; then | |
| echo "::error::VERCEL_TOKEN secret is not set. Add it in Settings → Secrets and variables → Actions, then re-run this workflow." | |
| exit 1 | |
| fi | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 | |
| with: | |
| node-version: 22 | |
| cache: npm | |
| - name: Install Vercel CLI | |
| # pinned for reproducibility in a token-bearing job; bump deliberately | |
| run: npm i -g vercel@55.0.0 | |
| - name: Pull Vercel project settings | |
| working-directory: ${{ matrix.dir }} | |
| run: vercel pull --yes --environment=production --token="$VERCEL_TOKEN" | |
| - name: Build (vercel.json builds the core first, then the site) | |
| working-directory: ${{ matrix.dir }} | |
| run: vercel build --prod --token="$VERCEL_TOKEN" | |
| - name: Deploy to production | |
| working-directory: ${{ matrix.dir }} | |
| run: vercel deploy --prebuilt --prod --token="$VERCEL_TOKEN" | |
| - name: Smoke check (machine routes + assets; retries ~30s for alias propagation) | |
| # A 200 on `/` proved almost nothing — the site's real contract is the machine | |
| # routes (/llms-full.txt, the raw /<page>.md copies, the schemas, the GBNF grammar, | |
| # the example SVGs) and, on the playground, the hashed JS bundle the shell loads. | |
| # scripts/smoke.mjs checks those; it is zero-dep Node and derives the docs route | |
| # list from docs-site/sync-docs.mjs, so a new page is covered automatically. | |
| run: node scripts/smoke.mjs --site ${{ matrix.name }} --base ${{ matrix.url }} |