Skip to content

Commit 429717b

Browse files
authored
Merge pull request #11 from chkware/feat/add-CI-CD
feat: add CI/CD
2 parents 5b16812 + 85c4c79 commit 429717b

1 file changed

Lines changed: 40 additions & 0 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
deploy:
10+
name: Deploy to GitHub Pages
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout repository
14+
uses: actions/checkout@v3
15+
16+
- name: Set up Node
17+
uses: actions/setup-node@v3
18+
with:
19+
node-version: 16.x
20+
21+
- name: Cache dependencies
22+
uses: actions/cache@v2
23+
with:
24+
path: |
25+
**/node_modules
26+
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
27+
28+
- name: Install dependencies
29+
run: npm ci
30+
31+
- name: Build
32+
run: npm run build
33+
34+
- name: Deploy to GitHub Pages
35+
uses: peaceiris/actions-gh-pages@v3
36+
with:
37+
github_token: ${{ secrets.GITHUB_TOKEN }}
38+
publish_dir: ./build
39+
user_name: github-actions[bot]
40+
user_email: 41898282+github-actions[bot]@users.noreply.github.com

0 commit comments

Comments
 (0)