Skip to content

Commit cc5f015

Browse files
Copilotcommjoen
andcommitted
Fix GitHub Pages workflow artifact naming conflict
- Give unique names to artifacts in different jobs (github-pages-preview vs github-pages-cleanup) - Add explicit artifact_name parameter to deploy-pages actions - Resolves "Multiple artifacts named 'github-pages'" error in workflow runs Co-authored-by: commjoen <[email protected]>
1 parent c9c4725 commit cc5f015

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

.github/workflows/github-pages-preview.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,10 +211,13 @@ jobs:
211211
uses: actions/upload-pages-artifact@v3
212212
with:
213213
path: ./static-site
214+
name: github-pages-preview
214215

215216
- name: Deploy to GitHub Pages
216217
id: deployment
217218
uses: actions/deploy-pages@v4
219+
with:
220+
artifact_name: github-pages-preview
218221

219222
- name: Comment PR with preview link
220223
uses: actions/github-script@v7
@@ -318,10 +321,13 @@ jobs:
318321
uses: actions/upload-pages-artifact@v3
319322
with:
320323
path: ./static-site
324+
name: github-pages-cleanup
321325

322326
- name: Deploy cleaned pages
323327
id: deployment
324328
uses: actions/deploy-pages@v4
329+
with:
330+
artifact_name: github-pages-cleanup
325331

326332
- name: Comment PR cleanup completion
327333
uses: actions/github-script@v7

0 commit comments

Comments
 (0)