Skip to content

Harden Pages deploy workflow with single retry on transient deploy-pages failures#5

Merged
Foscat merged 2 commits into
mainfrom
copilot/fix-deploy-github-actions-job-again
Jul 5, 2026
Merged

Harden Pages deploy workflow with single retry on transient deploy-pages failures#5
Foscat merged 2 commits into
mainfrom
copilot/fix-deploy-github-actions-job-again

Conversation

Copilot AI commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

The deploy GitHub Actions job was failing after successful artifact upload because actions/deploy-pages@v5 intermittently returned Deployment failed, try again later. This change makes deployment resilient to that transient failure mode without changing artifact generation or publish inputs.

  • Workflow behavior

    • Keep the existing deploy step as the primary attempt.
    • Mark the first deploy step continue-on-error: true.
    • Add a second deploy step that runs only when the first attempt fails (steps.deployment.outcome == 'failure').
  • Environment URL output

    • Update jobs.deploy.environment.url to resolve from retry output when present, otherwise fall back to the first deploy step output.
  • Workflow contract coverage

    • Extend test/pages-artifact.test.mjs to assert that retry semantics are present in .github/workflows/pages.yml (guards against accidental removal/regression).
- name: Deploy Pages artifact
  id: deployment
  continue-on-error: true
  uses: actions/deploy-pages@v5

- name: Retry Pages deploy once on transient failure
  id: deployment_retry
  if: ${{ steps.deployment.outcome == 'failure' }}
  uses: actions/deploy-pages@v5

Copilot AI changed the title [WIP] Fix failing GitHub Actions job deploy Harden Pages deploy workflow with single retry on transient deploy-pages failures Jul 5, 2026
Copilot finished work on behalf of Foscat July 5, 2026 20:00
Copilot AI requested a review from Foscat July 5, 2026 20:00
@Foscat Foscat marked this pull request as ready for review July 5, 2026 20:01
Copilot AI review requested due to automatic review settings July 5, 2026 20:01
@Foscat Foscat merged commit a893752 into main Jul 5, 2026
1 check passed
@Foscat Foscat deleted the copilot/fix-deploy-github-actions-job-again branch July 5, 2026 20:02

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Hardens the GitHub Pages deploy workflow against intermittent actions/deploy-pages@v5 transient failures by adding a single automatic retry, and adds a test guard to prevent the retry behavior from being accidentally removed.

Changes:

  • Make the first Pages deploy step continue-on-error: true, then add a conditional single retry step on failure.
  • Update the deploy job’s environment URL to use the retry step output when present, otherwise fall back to the first deploy output.
  • Extend the Pages workflow contract test to assert that retry semantics exist in .github/workflows/pages.yml.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
.github/workflows/pages.yml Adds a one-time retry deploy step and adjusts environment URL to prefer retry output.
test/pages-artifact.test.mjs Adds an assertion intended to lock in the retry semantics for the Pages workflow.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +76 to +81
assert(
pagesWorkflow.includes("continue-on-error: true") &&
pagesWorkflow.includes("Retry Pages deploy once on transient failure") &&
pagesWorkflow.includes("steps.deployment.outcome == 'failure'"),
"Pages workflow should retry deploy-pages once when the first deploy attempt fails"
);
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.

3 participants