Skip to content

Commit b67d71a

Browse files
committed
Fix Pages deploy workflow for transient backend failures.
Disable cancel-in-progress, add retry with backoff, and increase deploy-pages polling limits.
1 parent d5abcdb commit b67d71a

1 file changed

Lines changed: 26 additions & 5 deletions

File tree

.github/workflows/pages.yml

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ permissions:
1212

1313
concurrency:
1414
group: pages
15-
cancel-in-progress: true
15+
cancel-in-progress: false
1616

1717
jobs:
1818
build:
@@ -21,8 +21,6 @@ jobs:
2121
- uses: actions/checkout@v4
2222

2323
- uses: actions/configure-pages@v5
24-
with:
25-
enablement: true
2624

2725
- name: Validate site
2826
run: test -f docs/index.html
@@ -36,7 +34,30 @@ jobs:
3634
runs-on: ubuntu-latest
3735
environment:
3836
name: github-pages
39-
url: ${{ steps.deployment.outputs.page_url }}
37+
url: ${{ steps.deployment-retry.outputs.page_url || steps.deployment.outputs.page_url }}
4038
steps:
41-
- uses: actions/deploy-pages@v4
39+
- name: Deploy to GitHub Pages
4240
id: deployment
41+
uses: actions/deploy-pages@v4
42+
continue-on-error: true
43+
with:
44+
timeout: 900000
45+
error_count: 15
46+
reporting_interval: 10000
47+
48+
- name: Wait before retry
49+
if: steps.deployment.outcome == 'failure'
50+
run: sleep 60
51+
52+
- name: Retry deploy (transient Pages failures)
53+
id: deployment-retry
54+
if: steps.deployment.outcome == 'failure'
55+
uses: actions/deploy-pages@v4
56+
with:
57+
timeout: 900000
58+
error_count: 15
59+
reporting_interval: 10000
60+
61+
- name: Fail if both deploy attempts failed
62+
if: steps.deployment.outcome == 'failure' && steps.deployment-retry.outcome == 'failure'
63+
run: exit 1

0 commit comments

Comments
 (0)