From d7f14119d41b37e2beca7388d4fceeb5bae2bbda Mon Sep 17 00:00:00 2001 From: Jake Jarvis Date: Sat, 28 Mar 2020 23:41:48 -0400 Subject: [PATCH] separate netlify deploy & lighthouse jobs in CI --- .github/workflows/ci.yml | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6ac95ee2..9d958dcd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,21 +3,32 @@ name: CI on: [push, pull_request] jobs: + deploy: + runs-on: ubuntu-latest + if: "!contains(github.event.head_commit.message, '[skip ci]')" + steps: + - uses: actions/setup-node@v1 + with: + node-version: 12.x + - name: Install netlify-cli + run: npm install -g netlify-cli + - name: Wait for Netlify + run: netlify watch + env: + NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} + NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} + lighthouse: runs-on: ubuntu-latest if: "!contains(github.event.head_commit.message, '[skip ci]')" + needs: deploy steps: - uses: actions/checkout@v2 - uses: actions/setup-node@v1 with: node-version: 12.x - name: Install utilities - run: npm install -g netlify-cli @lhci/cli - - name: Wait for Netlify - run: netlify watch - env: - NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} - NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} + run: npm install -g @lhci/cli - name: Audit deploy preview if: github.event_name == 'pull_request' continue-on-error: true