Skip to content

Commit 40b5cfb

Browse files
committed
Add GH workflow to deploy automatically
1 parent f570306 commit 40b5cfb

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

.github/workflows/deploy.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- main # Change this if your default branch is different
7+
8+
workflow_dispatch: # Allows manual triggering from the GitHub Actions tab
9+
10+
permissions:
11+
contents: read
12+
pages: write
13+
id-token: write
14+
15+
jobs:
16+
build-and-deploy:
17+
runs-on: ubuntu-latest
18+
19+
steps:
20+
- name: Checkout Repository
21+
uses: actions/checkout@v4
22+
23+
- name: Setup Node.js
24+
uses: actions/setup-node@v4
25+
with:
26+
node-version: 18
27+
cache: npm
28+
29+
- name: Install Dependencies
30+
run: npm install
31+
32+
- name: Build Project
33+
run: npm run build
34+
35+
- name: Deploy to GitHub Pages
36+
uses: JamesIves/github-pages-deploy-action@v4
37+
with:
38+
branch: gh-pages
39+
folder: dist

0 commit comments

Comments
 (0)