Skip to content

Commit cc2f190

Browse files
committed
moved the generated images commit to output branch to keep master branch clean
1 parent 9c5a205 commit cc2f190

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

.github/workflows/main.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
push:
88
branches: [ master ]
99
schedule:
10-
- cron: "0 * * * *"
10+
- cron: "0 0 * * *"
1111
workflow_dispatch:
1212

1313
# A workflow run is made up of one or more jobs that can run sequentially or in
@@ -38,7 +38,8 @@ jobs:
3838
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
3939
restore-keys: |
4040
${{ runner.os }}-pip-
41-
41+
42+
4243
# Install dependencies with `pip`
4344
- name: Install requirements
4445
run: |
@@ -57,11 +58,13 @@ jobs:
5758
EXCLUDED_LANGS: ${{ secrets.EXCLUDE_LANGS }}
5859

5960
# Commits all changed files to the repository
60-
- name: Commit to the repo
61+
- name: Commit to the output branch of repo
6162
run: |
62-
git config --global user.name "jstrieb/github-stats"
63-
git config --global user.email "github-stats[bot]@jstrieb.github.io"
63+
git config --global user.name "github-actions[bot]"
64+
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
6465
git add .
66+
git commit -m 'temp commit' || echo
67+
git checkout output 2>/dev/null || git checkout --orphan output && git rm -rf . && git checkout main -- generated/
6568
# "echo" returns true so the build succeeds, even if no changed files
6669
git commit -m 'Update generated files' || echo
67-
git push
70+
git push origin output -f

0 commit comments

Comments
 (0)