Skip to content

Commit 41bd80d

Browse files
committed
Don't persist credentials longer than necessary in GitHub release-site actions
1 parent ceb62bc commit 41bd80d

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

.github/workflows/release-site.yml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ permissions:
2222
contents: write
2323

2424
jobs:
25-
release-site:
25+
build-site:
2626
runs-on: ubuntu-latest
2727
steps:
2828
- uses: actions/checkout@v5
@@ -40,6 +40,23 @@ jobs:
4040
echo "Moving site for module $module to target/site"
4141
mv $module/target/site target/site/$module
4242
done
43+
- uses: actions/upload-artifact@v4
44+
with:
45+
name: site
46+
path: target/site
47+
retention-days: 1
48+
49+
deploy-site:
50+
runs-on: ubuntu-latest
51+
needs: ['build-site']
52+
steps:
53+
- uses: actions/checkout@v5
54+
with:
55+
persist-credentials: true
56+
- uses: actions/download-artifact@v5
57+
with:
58+
name: site
59+
path: target/site
4360
- name: Deploy to gh-pages
4461
uses: JamesIves/github-pages-deploy-action@v4
4562
with:

0 commit comments

Comments
 (0)