File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change 77jobs :
88 build :
99 runs-on : ubuntu-latest
10+ outputs :
11+ commit-info : ${{ steps.commit-info.outputs.COMMIT_INFO }}
1012 steps :
1113 - uses : actions/checkout@v4
1214 with :
6466 with :
6567 path : site
6668
69+ - name : Generate commit info
70+ id : commit-info
71+ run : |
72+ git log -1 --pretty="COMMIT_INFO=%an: [%h] %s" >> "$GITHUB_OUTPUT"
73+
6774 deploy :
6875 needs : build
6976 if : github.ref == 'refs/heads/master'
@@ -88,15 +95,14 @@ jobs:
8895
8996 - name : Push site to gh-pages branch
9097 run : |
91- CINFO="$(git log -1 --pretty="%an: [%h] %s")"
9298 git clone --depth=1 --branch=gh-pages --single-branch --no-checkout \
93- "https://${GITHUB_ACTOR} :${{ secrets.GITHUB_TOKEN }}@github.com/${GITHUB_REPOSITORY }.git" test
99+ "https://${{ github.actor }} :${{ github.token }}@github.com/${{ github.repository } }.git" test
94100 mv test/.git site/.git && rmdir test/
95101 pushd site/ &>/dev/null
96102 git add -A
97103 git -c user.name=GitHub -c [email protected] commit \ 98104 -m "Auto deploy from GitHub Actions build ${GITHUB_RUN_NUMBER}" \
99- -m "$CINFO " \
105+ -m "${{ needs.build.outputs.commit-info }} " \
100106 --allow-empty
101107 git push
102108 popd &>/dev/null
You can’t perform that action at this time.
0 commit comments