Skip to content

Commit 5231c65

Browse files
author
R
committed
ci: each attempt of a run deploys its own Pages artifact
A rerun of a job on main reruns Pages after it, whose artifact then sat beside the first attempt's under the one name github-pages, and deploy-pages refused the two (run 44363778421, attempt 2). The artifact is now named github-pages-<attempt>, and deploy-pages deploys that one.
1 parent 958e7bb commit 5231c65

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,12 +207,17 @@ jobs:
207207
python3 tools/site/redirect.py --to https://webcpporg.github.io/ --prefix /webcpp/
208208
--out bin/redirect
209209
210+
# Each attempt of the run uploads its own artifact and deploys that one: a rerun's artifact
211+
# stays beside the earlier attempts', and deploy-pages refuses a name two artifacts share.
210212
- uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0
211213
with:
214+
name: github-pages-${{ github.run_attempt }}
212215
path: bin/redirect
213216

214217
- uses: actions/configure-pages@45bfe0192ca1faeb007ade9deae92b16b8254a0d # v6.0.0
215218

216219
- name: Deploy
217220
id: deploy
218221
uses: actions/deploy-pages@368f82528645a54fb793d4d04e342629a3f51346 # v5.0.1
222+
with:
223+
artifact_name: github-pages-${{ github.run_attempt }}

0 commit comments

Comments
 (0)