File tree Expand file tree Collapse file tree 1 file changed +22
-28
lines changed Expand file tree Collapse file tree 1 file changed +22
-28
lines changed Original file line number Diff line number Diff line change 1
- name : Deploy
1
+ name : Deploy to GitHub Pages
2
+
2
3
on :
3
4
push :
4
- branches : reactpress
5
- pull_request :
6
- branches : reactpress
5
+ branches :
6
+ - reactpress # 如果你的主分支是 master,请改为 master
7
7
8
8
jobs :
9
9
deploy :
10
- name : Deploy
11
10
runs-on : ubuntu-latest
12
11
13
- permissions :
14
- id-token : write # Needed for auth with Deno Deploy
15
- contents : read # Needed to clone the repository
16
-
17
12
steps :
18
- - name : Clone repository
13
+ - name : Checkout repository
19
14
uses : actions/checkout@v4
20
15
21
- - name : Install Deno
22
- uses : denoland/setup-deno@v2
23
- with :
24
- deno-version : v2.x
25
-
26
- - name : Install Node.js
16
+ - name : Setup Node.js
27
17
uses : actions/setup-node@v4
28
18
with :
29
- node-version : lts/*
19
+ node-version : 18 # 使用与项目兼容的 Node 版本
20
+
21
+ - name : Install dependencies
22
+ run : npm install
30
23
31
- - name : Install step
32
- run : " yarn "
24
+ - name : Build project
25
+ run : npm run build
33
26
34
- - name : Build step
35
- run : " yarn run build"
27
+ - name : Configure Git
28
+ run : |
29
+ git config --global user.name "GitHub Actions"
30
+ git config --global user.email "[email protected] "
36
31
37
- - name : Upload to Deno Deploy
38
- uses : denoland/deployctl@v1
32
+ - name : Deploy to gh-pages
33
+ uses : peaceiris/actions-gh-pages@v3
39
34
with :
40
- project : " b9348"
41
- entrypoint :
" https://deno.land/[email protected] /http/file_server.ts"
42
- root : " build"
43
-
44
-
35
+ github_token : ${{ secrets.GITHUB_TOKEN }}
36
+ publish_dir : ./build
37
+ force_orphan : true
38
+ keep_files : false
You can’t perform that action at this time.
0 commit comments