Skip to content

Commit fb5a191

Browse files
committed
ci(github): Add GitHub Actions workflow for deploying to GitHub Pages
1 parent 61f9f2f commit fb5a191

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Deploy-Github-Pages
2+
3+
on:
4+
push:
5+
branches: [main]
6+
7+
jobs:
8+
deploy-github-pages:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- uses: actions/checkout@v3
13+
- uses: actions/setup-node@v3
14+
with:
15+
node-version: 22
16+
cache: npm
17+
18+
- name: Install dependencies
19+
run: npm ci
20+
21+
- name: Build project
22+
run: npm run build
23+
24+
- name: Deploy to GitHub Pages
25+
uses: crazy-max/ghaction-github-pages@v4
26+
with:
27+
target_branch: gh-pages
28+
build_dir: dist
29+
jekyll: false
30+
env:
31+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)