File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed
Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change 1111
1212jobs :
1313 build-deploy :
14+ permissions :
15+ contents : write
1416 runs-on : ubuntu-latest
1517 if : " !contains(github.event.head_commit.message, 'skip ci')"
1618 steps :
1719 - uses : actions/checkout@v4
20+ with :
21+ fetch-depth : 0 # required so the deploy action can push
1822 - uses : actions/setup-node@v4
1923 with :
2024 node-version : ' 20'
Original file line number Diff line number Diff line change 88
99jobs :
1010 run-scripts :
11+ permissions :
12+ contents : write
1113 runs-on : ubuntu-latest
1214
1315 steps :
1416 - name : Checkout repository
1517 uses : actions/checkout@v4
18+ with :
19+ fetch-depth : 0 # ensure history for pushing changes
1620
1721 - name : Set up Node.js
1822 uses : actions/setup-node@v4
3943 git config --local user.email "[email protected] " 4044 git config --local user.name "GitHub Action"
4145 git add .
46+ if git diff --cached --quiet; then
47+ echo "No changes to commit" && exit 0
48+ fi
4249 git commit -m "chore: Automated data update from scripts"
4350 git push origin main
4451 env :
You can’t perform that action at this time.
0 commit comments