Skip to content

Commit e6f14b9

Browse files
committed
Fix GitHub Actions deployment: add unique artifact name and cleanup to prevent conflicts
1 parent 0cdbfe0 commit e6f14b9

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

.github/workflows/deploy.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ permissions:
1212

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

1717
defaults:
1818
run:
@@ -32,6 +32,13 @@ jobs:
3232
id: pages
3333
uses: actions/configure-pages@v4
3434

35+
- name: Clean previous artifacts
36+
run: |
37+
# Clean any previous artifacts to avoid conflicts
38+
rm -rf public/
39+
rm -f hugo_stats.json
40+
rm -f .hugo_build.lock
41+
3542
- name: Setup Hugo
3643
uses: peaceiris/actions-hugo@v2
3744
with:
@@ -52,6 +59,7 @@ jobs:
5259
uses: actions/upload-pages-artifact@v3
5360
with:
5461
path: ./public
62+
name: hugo-site
5563

5664
deploy:
5765
environment:

0 commit comments

Comments
 (0)