forked from dunwu/java-tutorial
-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (54 loc) · 1.7 KB
/
Copy pathdeploy.yml
File metadata and controls
63 lines (54 loc) · 1.7 KB
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: CI
# 在master分支发生push事件时触发。
on:
workflow_dispatch:
permissions:
checks: write
contents: write
packages: read
env: # 设置环境变量
TZ: Asia/Shanghai # 时区(设置时区可使页面中的`最近更新时间`使用时区时间)
jobs:
build: # 自定义名称
runs-on: ubuntu-latest # 运行在虚拟机环境ubuntu-latest
strategy:
matrix:
node-version: [16.x]
steps:
- name: Setup PSE
uses: invisirisk/pse-action@latest
with:
api_url: "https://app.stage.invisirisk.com"
app_token: ${{secrets.IR_API_KEY_BUILD}}
# 使用的动作。格式:userName/repoName。作用:检出仓库,获取源码。 官方actions库:https://github.com/actions
- name: Checkout
uses: actions/checkout@master
# 指定 nodejs 版本
- name: Use Nodejs ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
# 部署
- name: Deploy
env: # 设置环境变量
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
GITEE_TOKEN: ${{ secrets.GITEE_TOKEN }}
run: npm install && npm run deploy
- name: Cleanup PSE
if: always()
uses: invisirisk/pse-action@latest
with:
cleanup: "true"
gather_status_build:
runs-on: ubuntu-latest
name: Gather Status for build
needs: build
if: always()
steps:
- name: Gather Status
uses: invisirisk/pse-action@latest
with:
api_url: "https://app.stage.invisirisk.com"
app_token: ${{secrets.IR_API_KEY_BUILD}}
send_job_status: "true"
debug: "true"