Update explorer.yml
This commit is contained in:
parent
ced1505b75
commit
f385fa6d1d
|
@ -1,10 +1,6 @@
|
||||||
name: Explorer
|
name: Explorer_build&test_on_PR
|
||||||
on:
|
on:
|
||||||
push:
|
pull_request:
|
||||||
branches: [master]
|
|
||||||
paths:
|
|
||||||
- 'explorer/**'
|
|
||||||
pull_request_target:
|
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
paths:
|
paths:
|
||||||
|
@ -16,7 +12,6 @@ jobs:
|
||||||
defaults:
|
defaults:
|
||||||
run:
|
run:
|
||||||
working-directory: explorer
|
working-directory: explorer
|
||||||
if: github.event_name == 'pull_request_target'
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
|
@ -31,66 +26,3 @@ jobs:
|
||||||
- run: npm run format
|
- run: npm run format
|
||||||
- run: npm run build
|
- run: npm run build
|
||||||
- run: npm run test
|
- run: npm run test
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- uses: amondnet/vercel-action@v20
|
|
||||||
with:
|
|
||||||
vercel-token: ${{ secrets.VERCEL_TOKEN }} # Required
|
|
||||||
github-token: ${{ secrets.GITHUB_TOKEN }} #Optional
|
|
||||||
vercel-org-id: ${{ secrets.ORG_ID}} #Required
|
|
||||||
vercel-project-id: ${{ secrets.PROJECT_ID}} #Required
|
|
||||||
working-directory: ./explorer
|
|
||||||
scope: ${{ secrets.TEAM_ID }} #added solana(vercel) as "TEAM_ID"
|
|
||||||
Testing_before_merging:
|
|
||||||
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: Testing_before_merging
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
working-directory: explorer
|
|
||||||
if: github.event_name == 'push'
|
|
||||||
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
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
ref: ${{ github.event.pull_request.head.sha }}
|
|
||||||
- uses: amondnet/vercel-action@v20
|
|
||||||
with:
|
|
||||||
vercel-token: ${{ secrets.VERCEL_TOKEN }} # Required
|
|
||||||
github-token: ${{ secrets.GITHUB_TOKEN }} #Optional
|
|
||||||
vercel-args: '--prod' #for production
|
|
||||||
vercel-org-id: ${{ secrets.ORG_ID}} #Required
|
|
||||||
vercel-project-id: ${{ secrets.PROJECT_ID}} #Required
|
|
||||||
working-directory: ./explorer
|
|
||||||
scope: ${{ secrets.TEAM_ID }}
|
|
||||||
|
|
Loading…
Reference in New Issue