@@ -22,17 +22,19 @@ jobs:
2222 steps :
2323 - name : Generate a GitHub token
2424 id : ghtoken
25- 25+ uses : actions/create-github-app-token@df432ceedc7162793a195dd1713ff69aefc7379e # v2.0.6
2626 with :
2727 app-id : ${{ secrets.GH_APP_ID_DOCS }}
2828 owner : slackapi
2929 private-key : ${{ secrets.GH_APP_PRIVATE_KEY_DOCS }}
3030
3131 - name : Checkout the tool repo (source)
32- 32+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
33+ with :
34+ persist-credentials : false
3335
3436 - name : Checkout the docs site repo (destination)
35- 37+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
3638 with :
3739 repository : slackapi/slackapi.github.io
3840 path : " docs_repo"
4143
4244 - name : Update docs in docs site repo
4345 run : |
44- rsync -av --delete ./docs/ ./docs_repo/content/${{ github.event.repository.name }}/
46+ rsync -av --delete ./docs/ "./docs_repo/content/$REPO/"
47+ env :
48+ REPO : ${{ github.event.repository.name }}
4549
4650 - name : Install dependencies
4751 run : |
5660 - name : Create a pull request
5761 if : ${{ github.ref_name == github.event.repository.default_branch || github.event_name == 'workflow_dispatch' }}
5862 id : site-pr
59- uses :
peter-evans/[email protected] 63+ uses : peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8
6064 with :
6165 token : ${{ steps.ghtoken.outputs.token }}
6266 title : " From ${{ github.event.repository.name }}: ${{ github.event.pull_request.title || 'manual docs sync' }}"
7276 - name : Output the pull request link
7377 if : ${{ steps.site-pr.outputs.pull-request-url }}
7478 run : |
75- echo "Pull request created: ${{ steps.site-pr.outputs.pull-request-url }}" >> $GITHUB_STEP_SUMMARY
79+ echo "Pull request created: $URL" >> $GITHUB_STEP_SUMMARY
80+ env :
81+ URL : ${{ steps.site-pr.outputs.pull-request-url }}
0 commit comments