Skip to content

Commit 98beea4

Browse files
committed
chore: small changes to ci
Signed-off-by: GRBurst <GRBurst@protonmail.com>
1 parent 42ea958 commit 98beea4

1 file changed

Lines changed: 11 additions & 9 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -76,32 +76,34 @@ jobs:
7676
coverage run -m pytest -s
7777
coverage report -m
7878
79-
- name: Create Badge Directory
79+
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # pin@v3
8080
if: always() && github.ref_name == 'main' && github.event_name == 'push'
81-
run: mkdir -p badges
81+
with:
82+
ref: assets
83+
path: assets
84+
85+
- name: Create Badge Directory
86+
if: github.ref_name == 'main' && github.event_name == 'push'
87+
run: mkdir -p assets/badges
8288

8389
- name: Create Coverage Badge
8490
if: github.ref_name == 'main' && github.event_name == 'push'
8591
uses: tj-actions/coverage-badge-py@782bdaaa8b2e37612e6b6fac5e559e5544e6eef2 # pin@v2
8692
with:
87-
output: badges/coverage.svg
93+
output: assets/badges/coverage.svg
8894

8995
- name: Commit Badge
9096
if: github.ref_name == 'main' && github.event_name == 'push'
9197
run: |
98+
cd assets
9299
if [[ -n "$(git status --porcelain)" ]]; then
93100
git config --local user.email "action@github.com"
94101
git config --local user.name "GitHub Action"
95102
git add badges/coverage.svg
96103
git commit -m "Update coverage badge"
104+
git push
97105
fi
98106
99-
- name: Push Badge
100-
if: github.ref_name == 'main' && github.event_name == 'push'
101-
uses: ad-m/github-push-action@d9117be7cad08757e9e906a1bcd1716d6b192db5 # pin@master
102-
with:
103-
github_token: ${{ secrets.GITHUB_TOKEN }}
104-
branch: assets
105107
106108
deploy:
107109
name: "Deploy"

0 commit comments

Comments
 (0)