chore(ci): deploy Pages via GitHub Actions, drop committed docs/#18
Merged
Conversation
Migrate from legacy "build_type: legacy" Pages (serving main/docs) to the GitHub Actions artifact deployment model: - deploy.yml: build Hugo to public/ and publish via upload-pages-artifact + deploy-pages instead of committing built HTML back to docs/. Adds workflow_dispatch, pages/id-token permissions, and a pages concurrency group. - build.yml: PR validation now builds to public/ (was docs/). - Remove tracked build output: docs/ (4498 files), stray .github/workflows/public/, and .hugo_build.lock files. - gitignore docs/ and .hugo_build.lock to prevent re-tracking. static/CNAME (www.powershell.org) is baked into every build, so the custom domain is preserved. Flipping the repo Pages source to "GitHub Actions" is a one-time setting applied at cutover. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01T5qXD5Xg7YL1gpyhSN3WS1
✅ Deploy Preview for powershellorg ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
That is a lot of files! |
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.
Summary
Migrates GitHub Pages from the legacy "deploy from
mainbranch/docspath" model to the modern GitHub Actions artifact deployment (build_type: workflow). Hugo builds in CI and publishes viaupload-pages-artifact+deploy-pages— no built HTML is committed to any branch anymore.Changes
deploy.yml: build Hugo topublic/and deploy the artifact (configure-pages@v5→upload-pages-artifact@v3→deploy-pages@v4) instead of committing built HTML back intodocs/. Addsworkflow_dispatch,pages/id-tokenpermissions, and apagesconcurrency group.build.yml: PR validation builds topublic/(wasdocs/).docs/(4,498 files), stray.github/workflows/public/, and both.hugo_build.lockfiles..gitignore: addeddocs/and.hugo_build.lockto prevent re-tracking.static/CNAME(www.powershell.org) is baked into every build, so the custom domain is preserved automatically.Cutover (after merge)
The repo Pages source must be flipped once — this is a setting, not a file:
Do this right around the merge to avoid a window where Pages reads the now-deleted
docs/path. Then re-run Deploy Hugo Site and confirmhttps://www.powershell.org/serves the new build.Verification
hugo --gc --minify --destination publicbuilds 2,080 pages green;public/CNAME=www.powershell.org.🤖 Generated with Claude Code