Skip to content

Commit e37c8e4

Browse files
fix(git-action): deploy coverage on gh-pages
1 parent 0c9eb42 commit e37c8e4

File tree

2 files changed

+24
-1
lines changed

2 files changed

+24
-1
lines changed

.github/workflows/main.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,3 +118,26 @@ jobs:
118118
env:
119119
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
120120
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
121+
122+
deploy-ghpages:
123+
name: Deploy (GH-Pages)
124+
needs: semantic-version
125+
strategy:
126+
matrix:
127+
os: [ubuntu-latest]
128+
node: [20]
129+
130+
runs-on: ${{ matrix.os }}
131+
132+
steps:
133+
- name: download vitest code coverage results
134+
uses: actions/download-artifact@v4
135+
with:
136+
name: vitest-code-coverage-report
137+
path: ./coverage/
138+
- name: deploy to gh-pages
139+
uses: peaceiris/actions-gh-pages@v4
140+
with:
141+
github_token: ${{ secrets.GITHUB_TOKEN }}
142+
publish_dir: coverage
143+
# cname:

vitest.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default defineConfig({
44
test: {
55
coverage: {
66
provider: 'v8',
7-
reporter: ['text', 'json', 'lcov'],
7+
reporter: ['text', 'json', 'lcov', 'html'],
88
reportsDirectory: './coverage',
99
exclude: [
1010
...configDefaults.exclude,

0 commit comments

Comments
 (0)