Files
codegraph/.github/workflows/deploy-site.yml
T
Colby MchenryandClaude Opus 5.5 03c10ada87 ci(site): move the site deploy off the Node 20 action runtime (#3048)
The "Deploy site to GitHub Pages" workflow still used
actions/checkout@v4, withastro/action@v3 (setup-node v4 and
upload-pages-artifact v3 inside) and actions/deploy-pages@v4, all on
GitHub's deprecated Node 20 action runtime.

It now uses actions/checkout@v6, withastro/action@v6 and
actions/deploy-pages@v5, all on Node 24, pinned by major tag as
release.yml pins its actions. The tags resolve today to checkout v6.1.0,
withastro/action v6.1.4 and deploy-pages v5.0.1. checkout stays on v6 to
match release.yml; v7 mainly blocks fork checkouts in
pull_request_target.

Changed defaults, read from each release's notes and action.yml:
- checkout v5 and v6: Node 24 (runner 2.327.1 or newer), and persisted
  credentials go to a separate file. The breaking change in v6.1.0
  concerns only pull_request_target and workflow_run checkouts, which
  this job doesn't do.
- withastro/action v4 to v6: the node-version default went from 20 to
  24; this workflow sets 22 and keeps it. Install and build are still
  npm install and npm run build in site/. A new Astro build cache
  (node_modules/.astro, on by default) is restored before the build and
  saved after. The upload is upload-pages-artifact v5 with
  include-hidden-files: true, which packs the same files v3 did, and
  the built site has no dotfiles anyway.
- deploy-pages v5: Node 24 and polling backoff; inputs unchanged.

Nothing else changes: triggers, permissions, concurrency, the site path
and node-version 22. The YAML parses, and the site builds locally with
Node 22 (21 pages). The workflow was not run, because a run deploys the
live site.

Raised by PR 881 (@Dashsoap).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 15:49:09 +00:00

44 lines
908 B
YAML

name: Deploy site to GitHub Pages
on:
push:
branches: [main]
paths:
- 'site/**'
- '.github/workflows/deploy-site.yml'
workflow_dispatch:
# Allow GITHUB_TOKEN to deploy to Pages and verify the deployment origin.
permissions:
contents: read
pages: write
id-token: write
# One deploy at a time; let an in-progress run finish.
concurrency:
group: pages
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Build with Astro
uses: withastro/action@v6
with:
path: site
node-version: 22
deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v5