Skip to content

Commit 0874978

Browse files
committed
fix: update coverage workflow
1 parent 4022101 commit 0874978

1 file changed

Lines changed: 3 additions & 23 deletions

File tree

.github/workflows/coverage.yml

Lines changed: 3 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -27,25 +27,6 @@ jobs:
2727
deploy:
2828
runs-on: ubuntu-latest
2929
steps:
30-
- name: Checkout coverage branch
31-
uses: actions/checkout@v4
32-
with:
33-
ref: coverage
34-
35-
- name: Delete folder and push changes
36-
run: |
37-
git config user.name github-actions
38-
git config user.email github-actions@github.com
39-
git checkout coverage
40-
# Check if there are files to delete
41-
if [ -n "$(git ls-files)" ]; then
42-
git rm -rf *
43-
git commit -m "Delete all files in coverage branch"
44-
git push origin coverage
45-
else
46-
echo "No files to delete"
47-
fi
48-
4930
- name: Checkout main branch
5031
uses: actions/checkout@v4
5132
with:
@@ -74,9 +55,8 @@ jobs:
7455
run: |
7556
git config user.name github-actions
7657
git config user.email github-actions@github.com
77-
git checkout -B coverage
78-
git pull origin coverage --rebase --force
79-
git rebase --strategy=ours origin/coverage
80-
git add docs/*.js docs/*.html docs/*.css docs/*.png
58+
git checkout --orphan coverage
59+
git rm -rf .
60+
git add docs
8161
git commit -m "Update coverage report html"
8262
git push origin coverage --force --no-verify

0 commit comments

Comments
 (0)