diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 04010943..f16c6645 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -2,9 +2,12 @@ name: CI # 在master分支发生push事件时触发。 on: - push: - branches: - - master + workflow_dispatch: + +permissions: + checks: write + contents: write + packages: read env: # 设置环境变量 TZ: Asia/Shanghai # 时区(设置时区可使页面中的`最近更新时间`使用时区时间) @@ -18,6 +21,11 @@ jobs: 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 @@ -34,3 +42,22 @@ jobs: 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"