File tree Expand file tree Collapse file tree 1 file changed +34
-0
lines changed
Expand file tree Collapse file tree 1 file changed +34
-0
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"
34+ fi
You can’t perform that action at this time.
0 commit comments