Skip to content

Commit c874b7d

Browse files
committed
fix #2 release
1 parent 3465d07 commit c874b7d

File tree

2 files changed

+51
-52
lines changed

2 files changed

+51
-52
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,10 @@ on:
55
branches: [ main ]
66
pull_request:
77
branches: [ main ]
8-
# Add release trigger
9-
release:
10-
types: [published]
11-
12-
permissions:
13-
contents: read
14-
pages: write
15-
id-token: write
16-
17-
concurrency:
18-
group: "pages"
19-
cancel-in-progress: false
208

219
jobs:
2210
test:
2311
runs-on: ubuntu-latest
24-
if: github.event_name != 'release'
2512

2613
strategy:
2714
matrix:
@@ -61,42 +48,4 @@ jobs:
6148
uses: actions/upload-artifact@v4
6249
with:
6350
name: frontend-coverage-report
64-
path: coverage
65-
66-
build-and-deploy:
67-
runs-on: ubuntu-latest
68-
if: github.event_name == 'release'
69-
needs: test
70-
71-
steps:
72-
- uses: actions/checkout@v4
73-
74-
- name: Use Node.js
75-
uses: actions/setup-node@v4
76-
with:
77-
node-version: '18.x'
78-
cache: 'npm'
79-
80-
- name: Install dependencies
81-
run: npm ci
82-
83-
- name: Build
84-
run: npm run build
85-
86-
# Upload build output
87-
- name: Upload artifact
88-
uses: actions/upload-pages-artifact@v3
89-
with:
90-
path: ./dist
91-
92-
deploy:
93-
environment:
94-
name: github-pages
95-
url: ${{ steps.deployment.outputs.page_url }}
96-
runs-on: ubuntu-latest
97-
needs: build-and-deploy
98-
if: github.event_name == 'release'
99-
steps:
100-
- name: Deploy to GitHub Pages
101-
id: deployment
102-
uses: actions/deploy-pages@v4
51+
path: coverage

.github/workflows/release.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Release
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
permissions:
8+
contents: read
9+
pages: write
10+
id-token: write
11+
12+
concurrency:
13+
group: "pages"
14+
cancel-in-progress: false
15+
16+
jobs:
17+
build-and-deploy:
18+
runs-on: ubuntu-latest
19+
20+
steps:
21+
- uses: actions/checkout@v4
22+
23+
- name: Use Node.js
24+
uses: actions/setup-node@v4
25+
with:
26+
node-version: '18.x'
27+
cache: 'npm'
28+
29+
- name: Install dependencies
30+
run: npm ci
31+
32+
- name: Build
33+
run: npm run build
34+
35+
# Upload build output
36+
- name: Upload artifact
37+
uses: actions/upload-pages-artifact@v3
38+
with:
39+
path: ./dist
40+
41+
deploy:
42+
environment:
43+
name: github-pages
44+
url: ${{ steps.deployment.outputs.page_url }}
45+
runs-on: ubuntu-latest
46+
needs: build-and-deploy
47+
steps:
48+
- name: Deploy to GitHub Pages
49+
id: deployment
50+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)