Skip to content

Commit 506fcd5

Browse files
add workspace ownership reset after book build
1 parent 9b81640 commit 506fcd5

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
@@ -15,6 +15,13 @@ jobs:
1515
packages: write
1616

1717
steps:
18+
- name: Get Actions user id
19+
id: get_uid
20+
run: |
21+
actions_user_id=`id -u $USER`
22+
echo $actions_user_id
23+
echo "uid=$actions_user_id" >> $GITHUB_OUTPUT
24+
1825
- name: checkout production
1926
uses: actions/checkout@v2
2027
with:
@@ -24,6 +31,11 @@ jobs:
2431
run: |
2532
./build_html.sh
2633
34+
- name: Reset ownership of workspace after build
35+
uses: peter-murray/reset-workspace-ownership-action@v1
36+
with:
37+
user_id: ${{ steps.get_uid.outputs.uid }}
38+
2739
# Push the book's HTML to github-pages
2840
- name: GitHub Pages action
2941
uses: peaceiris/[email protected]
@@ -43,6 +55,11 @@ jobs:
4355
run: |
4456
./build_html.sh
4557
58+
- name: Reset ownership of workspace after build
59+
uses: peter-murray/reset-workspace-ownership-action@v1
60+
with:
61+
user_id: ${{ steps.get_uid.outputs.uid }}
62+
4663
# Push the book's HTML to github-pages
4764
- name: GitHub Pages action
4865
uses: peaceiris/[email protected]

0 commit comments

Comments
 (0)