Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 37 additions & 1 deletion .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
timeout-minutes: 10
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
url: ${{ steps.deployment.outputs.page_url || steps.deployment-retry-1.outputs.page_url || steps.deployment-retry-2.outputs.page_url || steps.deployment-retry-3.outputs.page_url }}

steps:
- name: Checkout the main repository
Expand All @@ -47,6 +47,42 @@ jobs:
with:
path: site

# `deploy-pages` looks the artifact up once, right after the upload, and the artifact service may not list it for
# several seconds (https://github.com/actions/deploy-pages/issues/451), which fails with `No artifacts named
# "github-pages" were found`. Pages itself also fails a deployment now and then with `Deployment failed, try again
# later`. Retry only the deployment: re-running the job uploads a second `github-pages` artifact, and the lookup
# then fails because it finds two. Remove the retries once https://github.com/actions/deploy-pages/pull/455 is
# released.
- name: Deploy to GitHub Pages
uses: actions/deploy-pages@368f82528645a54fb793d4d04e342629a3f51346 # v5.0.1
id: deployment
continue-on-error: true

- name: Wait before the first retry
if: steps.deployment.outcome == 'failure'
run: sleep 5

- name: Deploy to GitHub Pages (retry 1)
if: steps.deployment.outcome == 'failure'
uses: actions/deploy-pages@368f82528645a54fb793d4d04e342629a3f51346 # v5.0.1
id: deployment-retry-1
continue-on-error: true

- name: Wait before the second retry
if: steps.deployment-retry-1.outcome == 'failure'
run: sleep 20

- name: Deploy to GitHub Pages (retry 2)
if: steps.deployment-retry-1.outcome == 'failure'
uses: actions/deploy-pages@368f82528645a54fb793d4d04e342629a3f51346 # v5.0.1
id: deployment-retry-2
continue-on-error: true

- name: Wait before the last retry
if: steps.deployment-retry-2.outcome == 'failure'
run: sleep 60

- name: Deploy to GitHub Pages (retry 3)
if: steps.deployment-retry-2.outcome == 'failure'
uses: actions/deploy-pages@368f82528645a54fb793d4d04e342629a3f51346 # v5.0.1
id: deployment-retry-3
Loading