Skip to content

Commit 425aa91

Browse files
add workspace ownership reset after build book
1 parent f416a3b commit 425aa91

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

.github/workflows/build_book.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,13 @@ jobs:
2222
packages: write
2323

2424
steps:
25+
- name: Get Actions user id
26+
id: get_uid
27+
run: |
28+
actions_user_id=`id -u $USER`
29+
echo $actions_user_id
30+
echo "uid=$actions_user_id" >> $GITHUB_OUTPUT
31+
2532
- name: checkout production
2633
uses: actions/checkout@v2
2734
with:
@@ -31,6 +38,11 @@ jobs:
3138
run: |
3239
./build_html.sh
3340
41+
- name: Reset ownership of workspace after build
42+
uses: peter-murray/reset-workspace-ownership-action@v1
43+
with:
44+
user_id: ${{ steps.get_uid.outputs.uid }}
45+
3446
# Push the book's HTML to github-pages
3547
- name: GitHub Pages action
3648
uses: peaceiris/[email protected]
@@ -49,6 +61,11 @@ jobs:
4961
- name: Build the book
5062
run: |
5163
./build_html.sh
64+
65+
- name: Reset ownership of workspace after build
66+
uses: peter-murray/reset-workspace-ownership-action@v1
67+
with:
68+
user_id: ${{ steps.get_uid.outputs.uid }}
5269

5370
# Push the book's HTML to github-pages
5471
- name: GitHub Pages action

0 commit comments

Comments
 (0)