From 2601bc7de1bbbd14de410cd60403b5bd22d4cf0d Mon Sep 17 00:00:00 2001 From: Sam Alba Date: Fri, 17 Dec 2021 13:16:23 -0800 Subject: [PATCH] ci: moved website deploy in its own workflow to filter out paths Signed-off-by: Sam Alba --- .github/workflows/ci.yml | 32 ----------------------- .github/workflows/website.yml | 48 +++++++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+), 32 deletions(-) create mode 100644 .github/workflows/website.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8bcd4219..aa17a9e7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -168,38 +168,6 @@ jobs: run: | make universe-test - website: - name: Website - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Cypress run - uses: cypress-io/github-action@v2 - env: - REACT_APP_CLIENT_ID: 123 - REACT_APP_CLIENT_SECRET: 123 - REACT_APP_DAGGER_SITE_URI: https://dagger.io - REACT_APP_API_PROXY_ENABLE: false - REACT_APP_AMPLITUDE_ID: 123 - with: - config: chromeWebSecurity=false - install-command: yarn install --silent - start: | - yarn start - yarn start:withAuth - working-directory: ./website - - uses: actions/upload-artifact@v1 - if: failure() - with: - name: cypress-screenshots - path: website/cypress/screenshots - # Test run video was always captured, so this action uses "always()" condition - - uses: actions/upload-artifact@v1 - if: always() - with: - name: cypress-videos - path: website/cypress/videos doc: name: Documentation runs-on: ubuntu-latest diff --git a/.github/workflows/website.yml b/.github/workflows/website.yml new file mode 100644 index 00000000..6067090e --- /dev/null +++ b/.github/workflows/website.yml @@ -0,0 +1,48 @@ +name: Website + +on: + push: + branches: [main] + paths: + - "website/**" + pull_request: + branches: [main] + paths: + - "website/**" + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +jobs: + website: + name: Website + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Cypress run + uses: cypress-io/github-action@v2 + env: + REACT_APP_CLIENT_ID: 123 + REACT_APP_CLIENT_SECRET: 123 + REACT_APP_DAGGER_SITE_URI: https://dagger.io + REACT_APP_API_PROXY_ENABLE: false + REACT_APP_AMPLITUDE_ID: 123 + with: + config: chromeWebSecurity=false + install-command: yarn install --silent + start: | + yarn start + yarn start:withAuth + working-directory: ./website + - uses: actions/upload-artifact@v1 + if: failure() + with: + name: cypress-screenshots + path: website/cypress/screenshots + # Test run video was always captured, so this action uses "always()" condition + - uses: actions/upload-artifact@v1 + if: always() + with: + name: cypress-videos + path: website/cypress/videos