From 9eb1f5d04c8af6a1e26cd79700fc3bf64c5e4063 Mon Sep 17 00:00:00 2001 From: Marc Rousavy Date: Wed, 3 Mar 2021 13:17:34 +0100 Subject: [PATCH] Update build-docs.yml --- .github/workflows/build-docs.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/.github/workflows/build-docs.yml b/.github/workflows/build-docs.yml index 0b9ec72..3ea675d 100644 --- a/.github/workflows/build-docs.yml +++ b/.github/workflows/build-docs.yml @@ -1,11 +1,32 @@ name: Build Documentation on: + pull_request: + branches: [main] push: branches: [main] jobs: + checks: + if: github.event_name != 'push' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - uses: actions/setup-node@v1 + with: + node-version: '12.x' + - name: Test Build + run: | + if [ -e yarn.lock ]; then + yarn install --frozen-lockfile + elif [ -e package-lock.json ]; then + npm ci + else + npm i + fi + npm run build gh-release: + if: github.event_name != 'pull_request' runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 @@ -29,6 +50,8 @@ jobs: env: USE_SSH: true GIT_USER: git + CURRENT_BRANCH: main + DEPLOYMENT_BRANCH: gh-pages run: | git config --global user.email "actions@gihub.com" git config --global user.name "gh-actions"