Skip to content

Fix GitHub Pages deployment workflow for branch builds#29

Merged
Sendipad merged 2 commits intodocsfrom
codex/fix-deployment-to-gh-pages
Feb 22, 2026
Merged

Fix GitHub Pages deployment workflow for branch builds#29
Sendipad merged 2 commits intodocsfrom
codex/fix-deployment-to-gh-pages

Conversation

@Sendipad
Copy link
Copy Markdown
Owner

Motivation

  • The Pages workflow only triggered for a fixed branch list and failed to deploy from other branches, and generated site URLs could be incorrect for GitHub project pages.
  • In-progress Pages runs could produce stale deployments if not cancelled when re-run.

Description

  • Change the workflow trigger to run on pushes from any branch by using branches: - "**" so branch builds will deploy.
  • Add id: pages to the actions/configure-pages@v5 step and pass the Pages-provided base_url into Hugo via --baseURL "${{ steps.pages.outputs.base_url }}/" to produce correct URLs for project-site hosting.
  • Enable Hugo garbage collection in the build step by adding --gc and keep --minify to reduce output size.
  • Set workflow concurrency cancel-in-progress: true to avoid overlapping/stale Pages runs.

Testing

  • Parsed .github/workflows/deploy.yml successfully using ruby -e 'require "yaml"; YAML.load_file(".github/workflows/deploy.yml"); puts "ok"' (passed).
  • Attempted hugo version locally but hugo is not installed in this environment so the binary check failed; the CI workflow installs Hugo during run (so build will run in CI).

Codex Task

@Sendipad Sendipad merged commit b142fa2 into docs Feb 22, 2026
1 check passed
@Sendipad Sendipad deleted the codex/fix-deployment-to-gh-pages branch February 22, 2026 03:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant