Skip to content

Commit

Permalink
feat: 补充自动巡检 action (#2564)
Browse files Browse the repository at this point in the history
* feat: 补充自动巡检 actions

* feat: 修改 action 信息

* fix: limit branch

* feat: 使用自定义 actions

* Update auto-inspection.yml

使用v1有问题

* feat: dynamic branch

* Update auto-inspection.yml

Co-authored-by: liufu.lf <liufu.lf@antfin.com>
  • Loading branch information
lxfu1 and liufu.lf authored May 26, 2021
1 parent dea171a commit c4d21c2
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/auto-inspection.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: 🔂 Auto Inspection

on:
pull_request:
branches:
- master

jobs:
preview:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Get branch name (pull request)
run: echo "BRANCH_NAME=$(echo ${GITHUB_HEAD_REF})" >> $GITHUB_ENV
- uses: lxfu1/surge-preview@v2
id: preview_step
with:
project_name: 'G2Plot'
project_branch: ${{ env.BRANCH_NAME }}
surge_token: ${{ secrets.SURGE_TOKEN }}
github_token: ${{ secrets.GITHUB_TOKEN }}
build: |
npm install
- name: Get the preview url
run: echo "url => ${{ steps.preview_step.outputs.preview_url }}"

0 comments on commit c4d21c2

Please sign in to comment.