Skip to content

Commit cf7af38

Browse files
committed
Add a deploy to gh pages
For every update to main
1 parent 498a2df commit cf7af38

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- main # or master
7+
8+
jobs:
9+
build-and-deploy:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v4
14+
15+
- name: Setup Node.js
16+
uses: actions/setup-node@v4
17+
with:
18+
node-version: '20' # or your preferred Node.js version
19+
20+
- name: Install dependencies
21+
run: npm install
22+
23+
- name: Build package
24+
run: npm run build # Replace with your build command, outputting to e.g., 'dist'
25+
26+
- name: Deploy to GitHub Pages
27+
uses: peaceiris/actions-gh-pages@v4
28+
with:
29+
github_token: ${{ secrets.GITHUB_TOKEN }}
30+
publish_dir: ./dist # Directory containing your built output

0 commit comments

Comments
 (0)