name: Deploy site on: # the benchmark page renders the run committed in lib/bench/published/, so # the site no longer waits for a benchmark job: main is pushed, the site is # built from what main contains. (it used to be built from the benchmark # artifact, and had to run after that job; the page's fallback to a # comparison.json in lib/bench/results/ is for local builds now.) push: branches: [main] workflow_dispatch: concurrency: group: deploy-site cancel-in-progress: true permissions: contents: read env: NODE_VERSION: "24" PNPM_VERSION: "10" jobs: deploy: name: Build and deploy runs-on: namespace-profile-basic timeout-minutes: 30 steps: - name: Check out uses: namespacelabs/nscloud-checkout-action@v8 with: # the repo supplies both the site and the numbers. the page prints # the commit the numbers came from and how far main has moved since, # so the two drifting apart is visible rather than silent. ref: main - name: Set up pnpm uses: pnpm/action-setup@v4 with: version: ${{ env.PNPM_VERSION }} - name: Set up Node.js uses: actions/setup-node@v4 with: node-version: ${{ env.NODE_VERSION }} - name: Set up caches uses: namespacelabs/nscloud-cache-action@v1 with: cache: pnpm - name: Install dependencies run: pnpm install --frozen-lockfile - name: Build library run: pnpm build - name: Build site run: pnpm --filter=site build - name: Deploy to Cloudflare working-directory: lib/_site env: CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} run: pnpm exec wrangler deploy