File tree Expand file tree Collapse file tree 1 file changed +53
-0
lines changed Expand file tree Collapse file tree 1 file changed +53
-0
lines changed Original file line number Diff line number Diff line change
1
+ # 工作流的名称,如果省略,则使用当前文件名
2
+ name : Auto Deploy
3
+
4
+ # 从工作流生成的工作流运行的名称,如果省略,则使用提交时的commit信息
5
+ run-name : Deploy by @${{ github.actor }}
6
+
7
+ # 触发部署的条件
8
+ on :
9
+ # 每当 push 到 master 分支时触发部署
10
+ push :
11
+ branches :
12
+ - main
13
+
14
+ # 当前流程要执行的任务,可以是多个。[my_first_job]就是一个任务
15
+ jobs :
16
+ my_first_job :
17
+ name : build-and-deploy
18
+ runs-on : ubuntu-latest
19
+
20
+ steps :
21
+ - uses : actions/checkout@v4
22
+ - uses : pnpm/action-setup@v2
23
+ with :
24
+ version : 6.32.9
25
+ - uses : actions/setup-node@v4
26
+ with :
27
+ node-version : ' 14'
28
+ cache : ' pnpm'
29
+
30
+ - name : install
31
+ run : pnpm install
32
+
33
+ - name : Oxlint
34
+ run : pnpm lint:fix
35
+
36
+ - name : Run Build Script
37
+ run : pnpm run build:h5
38
+
39
+ - name : Deploy to GitHub Pages
40
+ # 此actions的官方文档 https://github.com/JamesIves/github-pages-deploy-action
41
+ uses : JamesIves/github-pages-deploy-action@v4
42
+ with :
43
+ # 要部署的文件夹,必填
44
+ folder : dist
45
+ # 希望部署的分支,默认gh-pages
46
+ branch : gh-pages
47
+ # # 仓库范围的访问令牌,可以将个人令牌的值存储在GitHub Secrets中
48
+ # # 默认情况是不需要填的,如果您需要更多权限,例如部署到另一个存储库才需要填写
49
+ # # ACCESS_TOKEN 对应GitHub Secrets中设置的字段,不要照搬
50
+ token : ${{ secrets.ACCESS_TOKEN }}
51
+ # # 部署到GitHub的不同仓库 <用户名>/<仓库名>
52
+ # # 此选项必须配置了TOKEN才能正常执行
53
+ # REPOSITORY-NAME: leoleor/leo2
You can’t perform that action at this time.
0 commit comments