Skip to content

Guard Docs Pages deployment when GitHub Pages is disabled - #45

Closed
johnaoga with Copilot wants to merge 4 commits into
mainfrom
copilot/fix-deploy-to-github-pages
Closed

johnaoga with Copilot wants to merge 4 commits into
mainfrom
copilot/fix-deploy-to-github-pages

Conversation

Copilot AI commented Sep 29, 2026 •

Copy link
Copy Markdown

The Docs workflow was failing in the Deploy to GitHub Pages job with a 404 from actions/deploy-pages when Pages was not enabled for the repository. This change makes deployment conditional on repository Pages availability so docs generation still runs without turning the workflow red.

  • Root cause surfaced in workflow design

    • docs.yml always executed actions/deploy-pages@v4, even when repos.getPages would return 404.
  • Workflow control-flow update

    • Added a check_pages job that queries github.rest.repos.getPages via actions/github-script.
    • Exposes enabled as a job output (true/false).
  • Deploy job hard gate

    • deploy now depends on both build and check_pages.
    • deploy runs only when needs.check_pages.outputs.enabled == 'true'.
deploy:
  needs: [build, check_pages]
  if: needs.check_pages.outputs.enabled == 'true'
  steps:
    - uses: actions/deploy-pages@v4

Copilot AI and others added 3 commits September 29, 2026 10:59
Co-authored-by: johnaoga <5575594+johnaoga@users.noreply.github.com>
Co-authored-by: johnaoga <5575594+johnaoga@users.noreply.github.com>
Co-authored-by: johnaoga <5575594+johnaoga@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix failing GitHub Actions job Deploy to GitHub Pages Guard Docs Pages deployment when GitHub Pages is disabled Sep 29, 2026
Copilot AI requested a review from johnaoga September 29, 2026 11:02
@johnaoga johnaoga closed this Sep 29, 2026
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