Skip to content

Commit 3f9b182

Browse files
committed
chore: separate deploy from publish
1 parent acc877a commit 3f9b182

File tree

2 files changed

+35
-8
lines changed

2 files changed

+35
-8
lines changed

.github/workflows/deploy.yaml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Deploy
2+
3+
on:
4+
release:
5+
types: [created]
6+
7+
jobs:
8+
build:
9+
env:
10+
GH_TOKEN: ${{ secrets.GH_TOKEN }}
11+
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
12+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
13+
CI: true
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
- uses: actions/setup-node@v4
18+
with:
19+
cache: 'npm'
20+
node-version: 23
21+
- name: Install dependencies
22+
run: npm install
23+
- name: Test
24+
run: npm test
25+
- name: Build
26+
if: success()
27+
run: npm run build
28+
if: success()
29+
- name: Deploy - https://draggable.github.io/formeo/
30+
if: success()
31+
uses: peaceiris/actions-gh-pages@v4
32+
with:
33+
github_token: ${{ secrets.GH_TOKEN }}
34+
publish_dir: ./dist/demo
35+

.github/workflows/publish.yaml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,3 @@ jobs:
3030
- name: Publish
3131
if: success()
3232
run: npx semantic-release
33-
- run: npm run build
34-
if: success()
35-
- name: Deploy - https://draggable.github.io/formeo/
36-
if: success()
37-
uses: peaceiris/actions-gh-pages@v4
38-
with:
39-
github_token: ${{ secrets.GH_TOKEN }}
40-
publish_dir: ./dist/demo

0 commit comments

Comments
 (0)