Deploy site via GitHub Actions instead of branch-based Pages - #11
Merged
Conversation
The Pages source is currently "deploy from a branch" (trunk /docs), so GitHub generates and runs its own pages-build-deployment workflow. That generated workflow pins actions/checkout@v4 and actions/upload-artifact@v4, which target Node.js 20 and now emit a deprecation warning on every run. Those versions live in GitHub's infrastructure, not this repo, so there is nothing here to bump. Take ownership of the deploy instead. All four actions are on current majors, which run on Node.js 24, clearing the warning. This also drops the pointless "Build with Jekyll" step the legacy path runs against our already-built Hugo output. Pull requests build only; deploys are gated to non-PR events. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Run 31505521515 warns:
Neither of those is pinned anywhere in this repo. Pages is currently set to Deploy from a branch (
trunk→/docs), so GitHub generates and runs its ownpages-build-deploymentworkflow, and those@v4pins live in GitHub's infrastructure. There is no version here to bump — the only way to control the action versions is to own the deploy.What
Adds
.github/workflows/deploy.yml, building the site with Hugo and publishing through the Pages deploy actions:actions/checkoutactions/configure-pagesactions/upload-pages-artifactactions/deploy-pagesRunner is
ubuntu-24.04.ubuntu-26.04exists but is still flagged preview inactions/runner-images, which isn't a great bet for the deploy path.No
setup-nodestep is needed — Hugo is a static binary, so the Node version here is dictated purely by the actions' own runtimes. Current majors are on Node 24, so the warning goes away on its own.Side benefit: the legacy path wastes a "Build with Jekyll" step on already-built Hugo output (hence the
.nojekyll). This skips it.Testing this PR
pull_requestis a trigger, and thedeployjob is gated behindif: github.event_name != 'pull_request'— so this PR exercises the full build and artifact upload without touching the live site.The deploy will fail until the Pages source is switched from Deploy from a branch to GitHub Actions (Settings → Pages). The build half is safe to verify on this PR either way; only the post-merge deploy depends on that flip.
Follow-up
Once this is live, the 92 tracked files under
docs/become build output nobody reads and can begit rm --cached'd with a.gitignoreentry.🤖 Generated with Claude Code