Skip to content

Commit 1d12764

Browse files
committed
Don't persist credentials longer than necessary in GitHub release-site actions
1 parent 665b70f commit 1d12764

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

.github/workflows/release-site.yml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,12 @@ 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
29+
with:
30+
persist-credentials: false
2931
- name: Set up JDK 11
3032
uses: actions/setup-java@v5
3133
with:
@@ -40,6 +42,23 @@ jobs:
4042
echo "Moving site for module $module to target/site"
4143
mv $module/target/site target/site/$module
4244
done
45+
- uses: actions/upload-artifact@v4
46+
with:
47+
name: site
48+
path: target/site
49+
retention-days: 1
50+
51+
deploy-site:
52+
runs-on: ubuntu-latest
53+
needs: ['build-site']
54+
steps:
55+
- uses: actions/checkout@v5
56+
with:
57+
persist-credentials: true
58+
- uses: actions/download-artifact@v5
59+
with:
60+
name: site
61+
path: target/site
4362
- name: Deploy to gh-pages
4463
uses: JamesIves/github-pages-deploy-action@v4
4564
with:

0 commit comments

Comments
 (0)