solana/.github/workflows/explorer.yml

97 lines
2.8 KiB
YAML
Raw Normal View History

name: Explorer
on:
push:
2021-10-23 01:09:07 -07:00
branches: [master]
paths:
- 'explorer/**'
pull_request_target:
branches:
- master
2021-10-22 14:08:53 -07:00
paths:
2021-10-23 01:09:07 -07:00
- 'explorer/**'
jobs:
2021-10-22 07:45:07 -07:00
check-explorer:
runs-on: ubuntu-latest
2021-10-23 05:44:32 -07:00
defaults:
run:
working-directory: explorer
2021-10-25 01:13:01 -07:00
if: github.event_name == 'pull_request_target'
steps:
- uses: actions/checkout@v2
2021-10-23 01:09:07 -07:00
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
2021-10-23 01:09:07 -07:00
- uses: actions/checkout@v2
- uses: amondnet/vercel-action@v20
with:
vercel-token: ${{ secrets.VERCEL_TOKEN }} # Required
2021-10-23 05:44:32 -07:00
github-token: ${{ secrets.GITHUB_TOKEN }} #Optional
2021-10-23 01:09:07 -07:00
vercel-org-id: ${{ secrets.ORG_ID}} #Required
vercel-project-id: ${{ secrets.PROJECT_ID}} #Required
working-directory: ./explorer
2021-10-24 22:59:49 -07:00
scope: ${{ secrets.TEAM_ID }} #added solana(vercel) as "TEAM_ID"
2021-10-24 23:46:42 -07:00
Testing_before_merging:
2021-10-23 05:44:32 -07:00
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:
2021-10-24 23:46:42 -07:00
needs: Testing_before_merging
2021-10-23 01:09:07 -07:00
runs-on: ubuntu-latest
2021-10-23 05:44:32 -07:00
defaults:
run:
working-directory: explorer
2021-10-23 01:09:07 -07:00
if: github.event_name == 'push'
steps:
2021-10-23 05:44:32 -07:00
- 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:
2021-10-23 01:09:07 -07:00
vercel-token: ${{ secrets.VERCEL_TOKEN }} # Required
2021-10-23 05:44:32 -07:00
github-token: ${{ secrets.GITHUB_TOKEN }} #Optional
2021-10-23 01:09:07 -07:00
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 }}