Update explorer.yml

This commit is contained in:
joeaba 2021-10-27 11:46:19 +05:30 committed by GitHub
parent ced1505b75
commit f385fa6d1d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 70 deletions

View File

@ -1,10 +1,6 @@
name: Explorer
name: Explorer_build&test_on_PR
on:
push:
branches: [master]
paths:
- 'explorer/**'
pull_request_target:
pull_request:
branches:
- master
paths:
@ -16,7 +12,6 @@ jobs:
defaults:
run:
working-directory: explorer
if: github.event_name == 'pull_request_target'
steps:
- uses: actions/checkout@v2
with:
@ -31,66 +26,3 @@ jobs:
- run: npm run format
- run: npm run build
- 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 }}