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 }}