-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (30 loc) ยท 935 Bytes
/
Copy pathdeploy.yml
File metadata and controls
37 lines (30 loc) ยท 935 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: Deploy to GitHub Pages
on:
push:
branches: [ main ] # ืืจืืฅ ืจืง ืืฉืืืืคืื ื-main
jobs:
build:
runs-on: ubuntu-latest
steps:
# ืฉืื 1: ืืฉืืืช ืืงืื ืืืืืืจ
- name: Checkout repository
uses: actions/checkout@v3
# ืฉืื 2: ืืชืงื ืช Node.js 20
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 20
# ืฉืื 3: ืืชืงื ืช ืื ืืชืืืืืช
- name: Install dependencies
run: npm ci
working-directory: ./client
# ืฉืื 4: ืื ืืืช ืืคืจืืืงื ืขื Vite
- name: Build project
run: npm run build
working-directory: ./client
# ืฉืื 5: ืคืจืืกื ื-GitHub Pages
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: .build