Skip to content

Commit 54f1339

Browse files
committed
ci: add deploy action
1 parent b127d56 commit 54f1339

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

.github/workflows/deploy.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Deploy
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
deploy:
10+
runs-on: ubuntu-latest
11+
env:
12+
PUBLISH_DIR: ./dist/dev-app/browser
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v4
16+
17+
- name: Set up Node.js
18+
uses: actions/setup-node@v4
19+
with:
20+
node-version: '22'
21+
22+
- name: Install dependencies
23+
run: yarn
24+
25+
- name: Build site
26+
run: npm run build
27+
28+
- name: Create 404.html
29+
run: cp ${{ env.PUBLISH_DIR }}/index.html ${{ env.PUBLISH_DIR }}/404.html
30+
31+
- name: Deploy to gh-pages
32+
uses: peaceiris/actions-gh-pages@v3
33+
with:
34+
github_token: ${{ secrets.GITHUB_TOKEN }}
35+
publish_dir: ${{ env.PUBLISH_DIR }}
36+
publish_branch: gh-pages
37+
user_name: 'github-actions[bot]'
38+
user_email: 'github-actions[bot]@users.noreply.github.com'

0 commit comments

Comments
 (0)