From 83b5e5fe773c639a6bd2a1a2ec986dd4c63ae509 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karol=20Wypch=C5=82o?= Date: Thu, 4 Mar 2021 15:59:40 +0100 Subject: [PATCH] only deploy on webapp changes (#635) * only deploy on webapp changes * split ci and deploy flows * test trigger * Revert "test trigger" This reverts commit 42baff0f5ae5487a83b733756b26c1f5b05057d7. --- .../{build.yml => continous-integration.yml} | 8 +---- .github/workflows/deploy-webapp.yml | 31 +++++++++++++++++++ 2 files changed, 32 insertions(+), 7 deletions(-) rename .github/workflows/{build.yml => continous-integration.yml} (84%) create mode 100644 .github/workflows/deploy-webapp.yml diff --git a/.github/workflows/build.yml b/.github/workflows/continous-integration.yml similarity index 84% rename from .github/workflows/build.yml rename to .github/workflows/continous-integration.yml index 9c7f95c1..a6566b69 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/continous-integration.yml @@ -1,4 +1,4 @@ -name: skynet-webportal CI +name: Continous Integration on: [pull_request] @@ -30,12 +30,6 @@ jobs: env: GATSBY_API_URL: "https://siasky.net" - - name: "Deploy to Skynet" - uses: kwypchlo/deploy-to-skynet-action@main - with: - upload-dir: packages/webapp/public - github-token: ${{ secrets.GITHUB_TOKEN }} - - name: Cypress run uses: cypress-io/github-action@v2 env: diff --git a/.github/workflows/deploy-webapp.yml b/.github/workflows/deploy-webapp.yml new file mode 100644 index 00000000..1bb5cb78 --- /dev/null +++ b/.github/workflows/deploy-webapp.yml @@ -0,0 +1,31 @@ +name: Deploy webapp to Skynet + +on: + pull_request: + paths: + - "packages/webapp/**" + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Use Node.js + uses: actions/setup-node@v1 + with: + node-version: 14.x + + - name: Install dependencies + run: yarn + + - name: "Build webapp" + run: yarn workspace webapp build + env: + GATSBY_API_URL: "https://siasky.net" + + - name: "Deploy to Skynet" + uses: kwypchlo/deploy-to-skynet-action@main + with: + upload-dir: packages/webapp/public + github-token: ${{ secrets.GITHUB_TOKEN }}