File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # These are supported funding model platforms
2+
3+ github : [joshbuchea]
4+ # patreon: # Replace with a single Patreon username
5+ # open_collective: # Replace with a single Open Collective username
6+ # ko_fi: # Replace with a single Ko-fi username
7+ # tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8+ # community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9+ # liberapay: # Replace with a single Liberapay username
10+ # issuehunt: # Replace with a single IssueHunt username
11+ # otechie: # Replace with a single Otechie username
12+ # custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
Original file line number Diff line number Diff line change 1+ name : Sync README to gh-pages
2+
3+ on :
4+ push :
5+ branches :
6+ - master
7+ paths :
8+ - README.md
9+ workflow_dispatch :
10+
11+ permissions :
12+ contents : write
13+
14+ jobs :
15+ sync :
16+ runs-on : ubuntu-latest
17+
18+ steps :
19+ - name : Checkout master
20+ uses : actions/checkout@v4
21+ with :
22+ ref : master
23+ fetch-depth : 0
24+
25+ - name : Save README from master
26+ run : cp README.md /tmp/README.md
27+
28+ - name : Checkout gh-pages
29+ run : |
30+ git fetch origin gh-pages
31+ git checkout gh-pages
32+
33+ - name : Replace README
34+ run : |
35+ cp /tmp/README.md README.md
36+
37+ - name : Commit if changed
38+ run : |
39+ git config user.name "github-actions"
40+ git config user.email "github-actions@github.com"
41+
42+ if git diff --quiet README.md; then
43+ echo "No changes to commit"
44+ exit 0
45+ fi
46+
47+ git add README.md
48+ git commit -m "Sync README from master"
49+ git push origin gh-pages
You can’t perform that action at this time.
0 commit comments