Skip to content

Commit 32663c4

Browse files
committed
Update GitHub Actions
1 parent e195d19 commit 32663c4

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

.github/workflows/tests.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,23 +43,33 @@ jobs:
4343
run: |
4444
git config --global user.email "github-actions[bot]@users.noreply.github.com"
4545
git config --global user.name "github-actions[bot]"
46+
4647
cd docs/wiki
4748
git remote set-url origin https://x-access-token:${{ github.token }}@github.com/${{ github.repository }}.wiki.git
48-
git pull
49+
50+
git fetch origin
51+
git checkout ${{ github.head_ref || github.ref_name }}
52+
git pull origin ${{ github.head_ref || github.ref_name }} --rebase
53+
4954
git add .
5055
if git diff --cached --quiet; then
5156
echo "No changes to commit in submodule"
5257
exit 0
5358
fi
59+
5460
git commit -m "Update wiki content"
5561
git push origin HEAD:refs/heads/${{ github.head_ref || github.ref_name }}
62+
5663
cd ../..
64+
5765
git submodule update --remote --merge
66+
5867
git add docs/wiki
5968
if git diff --cached --quiet; then
6069
echo "No submodule reference change to commit"
6170
exit 0
6271
fi
72+
6373
git commit -m "Update wiki submodule reference [skip ci]"
6474
git push origin HEAD:refs/heads/${{ github.head_ref || github.ref_name }}
6575
tests:

0 commit comments

Comments
 (0)