From 2da5238dcc8f6c0d1e765b0f39d84b689b1ad946 Mon Sep 17 00:00:00 2001 From: joeaba <77398477+joeaba@users.noreply.github.com> Date: Sat, 23 Oct 2021 13:39:07 +0530 Subject: [PATCH] Update explorer.yml --- .github/workflows/explorer.yml | 45 +++++++++++++++++++++++++--------- 1 file changed, 34 insertions(+), 11 deletions(-) diff --git a/.github/workflows/explorer.yml b/.github/workflows/explorer.yml index 9d8e0b2b04..afaeaf5af1 100644 --- a/.github/workflows/explorer.yml +++ b/.github/workflows/explorer.yml @@ -1,28 +1,27 @@ + name: Explorer on: push: - branches: [ master ] + branches: [master] + paths: + - 'explorer/**' + pull_request_target: + branches: + - master paths: - - "explorer/**" - pull_request: - branches: [ master ] - paths: - - "explorer/**" - + - 'explorer/**' jobs: check-explorer: 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" (v16) is not supported by node-sass yet - # https://github.com/sass/node-sass/pull/3090 node-version: '14' cache: 'npm' cache-dependency-path: explorer/package-lock.json @@ -31,3 +30,27 @@ 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.PAT }} #Optional + vercel-org-id: ${{ secrets.ORG_ID}} #Required + vercel-project-id: ${{ secrets.PROJECT_ID}} #Required + working-directory: ./explorer + scope: ${{ secrets.TEAM_ID }} + production: + needs: check-explorer + runs-on: ubuntu-latest + if: github.event_name == 'push' + steps: + - uses: actions/checkout@v2 + - uses: amondnet/vercel-action@v20 + with: + vercel-token: ${{ secrets.VERCEL_TOKEN }} # Required + github-token: ${{ secrets.PAT }} #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 }}