From 5309a5149dc7f3045c4baf6f70a97b0fe266df07 Mon Sep 17 00:00:00 2001 From: joeaba <77398477+joeaba@users.noreply.github.com> Date: Wed, 27 Oct 2021 12:30:13 +0530 Subject: [PATCH] Create explorer_production.yml --- .github/workflows/explorer_production.yml | 46 +++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 .github/workflows/explorer_production.yml diff --git a/.github/workflows/explorer_production.yml b/.github/workflows/explorer_production.yml new file mode 100644 index 0000000000..78bfacdcf9 --- /dev/null +++ b/.github/workflows/explorer_production.yml @@ -0,0 +1,46 @@ +name: Explorer_production_build&test +on: + push: + branches: [master] + paths: + - 'explorer/**' +jobs: + Explorer_production_build_test: + runs-on: ubuntu-latest + 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 + + Explorer_production_deploy: + needs: Explorer_production_build_test + runs-on: ubuntu-latest + defaults: + run: + working-directory: explorer + steps: + - 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 }}