File tree Expand file tree Collapse file tree 1 file changed +35
-33
lines changed
Expand file tree Collapse file tree 1 file changed +35
-33
lines changed Original file line number Diff line number Diff line change 1- name : Sync doc changes
2- on :
3- workflow_dispatch :
4- push :
5- branches : [ master ]
6-
7- permissions :
8- contents : write
9-
10- jobs :
11- sync-docs :
12- name : Sync content from master to pages
13- runs-on : ubuntu-latest
14- steps :
15- - name : Checkout
16- uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
17- with :
18- submodules : false
19- fetch-depth : 0 # Necessary to get both the master and pages branches
20- fetch-tags : false
21- ref : pages
22-
23- - name : Commit and push, if docs have changed
24- run : |
25- if ! git diff origin/master -- ./doc ./AUTHORS.md ./LICENCE.md ./SECURITY.md \
26- ./README ./NON-AUTOTOOLS-BUILD >/dev/null ; then
27- # Differences from master: merge and push
28- git config user.name "github-actions[bot]"
29- git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
30- git merge origin/master --no-edit -m"Sync content from master to pages"
31- git push
32- else
33- echo "No content changes to sync"
1+ name : Sync doc changes
2+ on :
3+ workflow_dispatch :
4+ push :
5+ branches : [ master ]
6+
7+ permissions :
8+ contents : read
9+
10+ jobs :
11+ sync-docs :
12+ name : Sync content from master to pages
13+ runs-on : ubuntu-latest
14+ permissions :
15+ contents : write
16+ steps :
17+ - name : Checkout
18+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
19+ with :
20+ submodules : false
21+ fetch-depth : 0 # Necessary to get both the master and pages branches
22+ fetch-tags : false
23+ ref : pages
24+
25+ - name : Commit and push, if docs have changed
26+ run : |
27+ if ! git diff origin/master -- ./doc ./AUTHORS.md ./LICENCE.md ./SECURITY.md \
28+ ./README ./NON-AUTOTOOLS-BUILD >/dev/null ; then
29+ # Differences from master: merge and push
30+ git config user.name "github-actions[bot]"
31+ git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
32+ git merge origin/master --no-edit -m"Sync content from master to pages"
33+ git push
34+ else
35+ echo "No content changes to sync"
3436 fi
You can’t perform that action at this time.
0 commit comments