File tree Expand file tree Collapse file tree 1 file changed +26
-25
lines changed Expand file tree Collapse file tree 1 file changed +26
-25
lines changed Original file line number Diff line number Diff line change 1
- name : Deploy Static Site
1
+ name : Build and Deploy
2
2
3
3
on :
4
4
push :
5
5
branches :
6
6
- main
7
7
8
8
jobs :
9
- deploy :
9
+ build_and_deploy :
10
10
runs-on : ubuntu-latest
11
11
12
12
steps :
13
- - name : Checkout Repository
14
- uses : actions/checkout@v2
15
- with :
16
- node-version : 16
17
-
18
- - name : Install pnpm
19
- run : npm install -g @pnpm/exec
20
-
21
- - name : Testing
22
- run : |
23
- pnpm install
24
- pnpm run test
25
-
26
- - name : Build and Generate Static Site
27
- run : |
28
- pnpm install
29
- pnpm run prod
30
-
31
- - name : Deploy to GitHub Pages
32
- uses : peaceiris/actions-gh-pages@v3
33
- with :
34
- github_token : ${{ secrets.GITHUB_TOKEN }}
35
- publish_dir : ./build # Adjust the directory containing your static site
13
+ - uses : actions/checkout@v2
36
14
15
+ - name : Setup Node.js environment
16
+ uses : actions/setup-node@v2
17
+ with :
18
+ node-version : ' 16.x'
19
+
20
+ - name : Install pnpm
21
+ run : npm install -g pnpm
22
+
23
+ - name : Install dependencies
24
+ run : pnpm install
25
+
26
+ - name : Run tests
27
+ run : pnpm test
28
+
29
+ - name : Build
30
+ run : pnpm prod
31
+
32
+ - name : Deploy to GitHub Pages
33
+ uses : peaceiris/actions-gh-pages@v4
34
+ with :
35
+ publish-dir : ./build
36
+ publish-branch : gh-pages
37
+ deploy_key : ${{ secrets.DEPLOY_KEY }}
You can’t perform that action at this time.
0 commit comments