From d8c80b1cabd051700572f586ce33bd4b05aee1aa Mon Sep 17 00:00:00 2001 From: Karol Wypchlo Date: Thu, 4 Mar 2021 15:22:49 +0100 Subject: [PATCH] split ci and deploy flows --- .../{build.yml => continous-integration.yml} | 13 ++------ .github/workflows/deploy-webapp.yml | 31 +++++++++++++++++++ 2 files changed, 33 insertions(+), 11 deletions(-) rename .github/workflows/{build.yml => continous-integration.yml} (80%) create mode 100644 .github/workflows/deploy-webapp.yml diff --git a/.github/workflows/build.yml b/.github/workflows/continous-integration.yml similarity index 80% rename from .github/workflows/build.yml rename to .github/workflows/continous-integration.yml index 367fcdd7..a6566b69 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/continous-integration.yml @@ -1,9 +1,6 @@ -name: skynet-webportal CI +name: Continous Integration -on: - pull_request: - paths: - - "packages/webapp/**" +on: [pull_request] jobs: build: @@ -33,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 }}