Skip to content

chore(ci): deploy Pages via GitHub Actions, drop committed docs/#18

Merged
HeyItsGilbert merged 1 commit into
mainfrom
chore/pages-actions-deploy
Jun 20, 2026
Merged

chore(ci): deploy Pages via GitHub Actions, drop committed docs/#18
HeyItsGilbert merged 1 commit into
mainfrom
chore/pages-actions-deploy

Conversation

@HeyItsGilbert

Copy link
Copy Markdown
Member

Summary

Migrates GitHub Pages from the legacy "deploy from main branch /docs path" model to the modern GitHub Actions artifact deployment (build_type: workflow). Hugo builds in CI and publishes via upload-pages-artifact + deploy-pages — no built HTML is committed to any branch anymore.

Changes

  • deploy.yml: build Hugo to public/ and deploy the artifact (configure-pages@v5upload-pages-artifact@v3deploy-pages@v4) instead of committing built HTML back into docs/. Adds workflow_dispatch, pages/id-token permissions, and a pages concurrency group.
  • build.yml: PR validation builds to public/ (was docs/).
  • Removed tracked build output: docs/ (4,498 files), stray .github/workflows/public/, and both .hugo_build.lock files.
  • .gitignore: added 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 automatically.

Cutover (after merge)

The repo Pages source must be flipped once — this is a setting, not a file:

gh api -X PUT repos/PowerShellOrg/PowerShellOrgWebsite/pages -f build_type=workflow

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 confirm https://www.powershell.org/ serves the new build.

Verification

  • Local hugo --gc --minify --destination public builds 2,080 pages green; public/CNAME = www.powershell.org.

🤖 Generated with Claude Code

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
@netlify

netlify Bot commented Jun 20, 2026

Copy link
Copy Markdown

Deploy Preview for powershellorg ready!

Name Link
🔨 Latest commit 8ef3291
🔍 Latest deploy log https://app.netlify.com/projects/powershellorg/deploys/6a35edf57258ff0007bc533d
😎 Deploy Preview https://deploy-preview-18--powershellorg.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@therealgill

Copy link
Copy Markdown

That is a lot of files!

@HeyItsGilbert HeyItsGilbert reopened this Jun 20, 2026
@HeyItsGilbert HeyItsGilbert enabled auto-merge (squash) June 20, 2026 01:37
@HeyItsGilbert HeyItsGilbert disabled auto-merge June 20, 2026 01:37
@HeyItsGilbert HeyItsGilbert merged commit 8eb3687 into main Jun 20, 2026
6 checks passed
@HeyItsGilbert HeyItsGilbert deleted the chore/pages-actions-deploy branch June 20, 2026 01:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants