Skip to content

Commit 9778a2b

Browse files
committed
ci: update to rolling docs CI
1 parent e3ceb3c commit 9778a2b

File tree

1 file changed

+15
-20
lines changed

1 file changed

+15
-20
lines changed

.github/workflows/update_docs.yml

Lines changed: 15 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,44 @@
11
name: Sync libdebug gh-pages into main
2-
32
on:
43
push:
5-
branches:
6-
- main
4+
branches: [main]
5+
repository_dispatch:
6+
types: [refresh_rolling]
77

88
jobs:
99
sync:
10+
if: github.actor != 'github-actions[bot]'
1011
runs-on: ubuntu-latest
11-
permissions:
12-
contents: write
12+
permissions: { contents: write }
1313

1414
steps:
15-
- name: Checkout this repo
16-
uses: actions/checkout@v4
17-
with:
18-
fetch-depth: 0
15+
- uses: actions/checkout@v4
16+
with: { fetch-depth: 0 }
1917

2018
- name: Checkout libdebug gh-pages
2119
uses: actions/checkout@v4
2220
with:
2321
repository: libdebug/libdebug
2422
ref: gh-pages
25-
path: libdebug-pages
23+
path: /tmp/libdebug-pages
2624
fetch-depth: 1
25+
token: ${{ secrets.GITHUB_TOKEN }}
2726

28-
- name: Sync files from gh-pages
27+
- name: Sync files
2928
run: |
30-
# copy all files over, but leave existing files intact and skip any .git dirs
31-
rsync -av libdebug-pages/ . \
32-
--exclude '.github/**' \
33-
--exclude '.git' \
34-
--exclude '.git/**'
29+
rsync -av /tmp/libdebug-pages/ ./ \
30+
--exclude '.git' --exclude '.github/**' --exclude 'CNAME'
3531
36-
- name: Commit & push changes
32+
- name: Commit & push
3733
env:
3834
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3935
run: |
4036
git config user.name "github-actions[bot]"
4137
git config user.email "github-actions[bot]@users.noreply.github.com"
42-
4338
if git diff --quiet; then
4439
echo "✅ Nothing to commit."
4540
else
4641
git add --all
47-
git commit -m "chore: sync content from libdebug/libdebug@gh-pages"
48-
git push origin main
42+
git commit -m "chore: sync content from libdebug@gh-pages"
43+
git push origin HEAD
4944
fi

0 commit comments

Comments
 (0)