Update explorer.yml
This commit is contained in:
parent
81cc3eaabb
commit
a695e2a9d5
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
name: Explorer
|
name: Explorer
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
|
@ -13,9 +12,11 @@ on:
|
||||||
jobs:
|
jobs:
|
||||||
check-explorer:
|
check-explorer:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
defaults:
|
defaults:
|
||||||
run:
|
run:
|
||||||
working-directory: explorer
|
working-directory: explorer
|
||||||
|
if: github.event_name == 'pull_request_target' && github.event.action == 'opened'
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
|
@ -34,21 +35,60 @@ jobs:
|
||||||
- uses: amondnet/vercel-action@v20
|
- uses: amondnet/vercel-action@v20
|
||||||
with:
|
with:
|
||||||
vercel-token: ${{ secrets.VERCEL_TOKEN }} # Required
|
vercel-token: ${{ secrets.VERCEL_TOKEN }} # Required
|
||||||
github-token: ${{ secrets.PAT }} #Optional
|
github-token: ${{ secrets.GITHUB_TOKEN }} #Optional
|
||||||
vercel-org-id: ${{ secrets.ORG_ID}} #Required
|
vercel-org-id: ${{ secrets.ORG_ID}} #Required
|
||||||
vercel-project-id: ${{ secrets.PROJECT_ID}} #Required
|
vercel-project-id: ${{ secrets.PROJECT_ID}} #Required
|
||||||
working-directory: ./explorer
|
working-directory: ./explorer
|
||||||
scope: ${{ secrets.TEAM_ID }}
|
scope: ${{ secrets.TEAM_ID }}
|
||||||
production:
|
push:
|
||||||
needs: check-explorer
|
runs-on: ubuntu-latest
|
||||||
|
if: github.event_name == 'push'
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
working-directory: explorer
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
ref: ${{ github.event.pull_request.head.sha }}
|
||||||
|
- uses: actions/setup-node@v2
|
||||||
|
with:
|
||||||
|
node-version: '14'
|
||||||
|
cache: 'npm'
|
||||||
|
cache-dependency-path: explorer/package-lock.json
|
||||||
|
- run: npm i -g npm@7
|
||||||
|
- run: npm ci
|
||||||
|
- run: npm run format
|
||||||
|
- run: npm run build
|
||||||
|
- run: npm run test
|
||||||
|
|
||||||
|
production_deployment:
|
||||||
|
needs: push
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
working-directory: explorer
|
||||||
if: github.event_name == 'push'
|
if: github.event_name == 'push'
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- uses: amondnet/vercel-action@v20
|
with:
|
||||||
with:
|
ref: ${{ github.event.pull_request.head.sha }}
|
||||||
|
- uses: actions/setup-node@v2
|
||||||
|
with:
|
||||||
|
node-version: '14'
|
||||||
|
cache: 'npm'
|
||||||
|
cache-dependency-path: explorer/package-lock.json
|
||||||
|
- run: npm i -g npm@7
|
||||||
|
- run: npm ci
|
||||||
|
- run: npm run format
|
||||||
|
- run: npm run build
|
||||||
|
- run: npm run test
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
ref: ${{ github.event.pull_request.head.sha }}
|
||||||
|
- uses: amondnet/vercel-action@v20
|
||||||
|
with:
|
||||||
vercel-token: ${{ secrets.VERCEL_TOKEN }} # Required
|
vercel-token: ${{ secrets.VERCEL_TOKEN }} # Required
|
||||||
github-token: ${{ secrets.PAT }} #Optional
|
github-token: ${{ secrets.GITHUB_TOKEN }} #Optional
|
||||||
vercel-args: '--prod' #for production
|
vercel-args: '--prod' #for production
|
||||||
vercel-org-id: ${{ secrets.ORG_ID}} #Required
|
vercel-org-id: ${{ secrets.ORG_ID}} #Required
|
||||||
vercel-project-id: ${{ secrets.PROJECT_ID}} #Required
|
vercel-project-id: ${{ secrets.PROJECT_ID}} #Required
|
||||||
|
|
Loading…
Reference in New Issue