Skip to content

Commit 1f7af84

Browse files
add workspace ownership reset after book build
1 parent 4d5257a commit 1f7af84

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

.github/workflows/deploy_pr_preview.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,14 @@ jobs:
2323
checkName: "Rebuild docker image"
2424
ref: ${{ github.event.pull_request.head.sha }}
2525
timeoutSeconds: 60000
26-
26+
27+
- name: Get Actions user id
28+
id: get_uid
29+
run: |
30+
actions_user_id=`id -u $USER`
31+
echo $actions_user_id
32+
echo "uid=$actions_user_id" >> $GITHUB_OUTPUT
33+
2734
- name: Checkout the repo
2835
uses: actions/checkout@v2
2936
with:
@@ -34,6 +41,11 @@ jobs:
3441
run: |
3542
./build_html.sh
3643
44+
- name: Reset ownership of workspace after build
45+
uses: peter-murray/reset-workspace-ownership-action@v1
46+
with:
47+
user_id: ${{ steps.get_uid.outputs.uid }}
48+
3749
# Push the book's HTML to github-pages
3850
- name: GitHub Pages action
3951
uses: peaceiris/[email protected]
@@ -65,7 +77,6 @@ jobs:
6577
destination_dir: diff${{ github.event.number }}
6678
# force_orphan: true # once peaceiris updates to v4, change this to true and keep_files: true for the PR / main branch deploy previews
6779

68-
6980
- name: Post URLS to PR thread
7081
uses: mshick/[email protected]
7182
with:

0 commit comments

Comments
 (0)