From 0bcd7c6862f9bb8772082f54c53fcf936b984a8b Mon Sep 17 00:00:00 2001 From: Cyrus Goh Date: Fri, 16 Apr 2021 00:46:05 -0700 Subject: [PATCH] ci: check docs build (#9125) Co-authored-by: Alessio Treglia --- .github/workflows/check-docs.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/check-docs.yml diff --git a/.github/workflows/check-docs.yml b/.github/workflows/check-docs.yml new file mode 100644 index 000000000000..2954217d8c5e --- /dev/null +++ b/.github/workflows/check-docs.yml @@ -0,0 +1,25 @@ +name: Check docs build +# This workflow runs when a PR is labeled with `docs` +# This will check if the docs build successfully by running `npm run build` +on: + pull_request: + types: [ labeled ] + +jobs: + check-docs-build: + if: ${{ github.event.label.name == 'docs' }} + + name: Check docs build + runs-on: ubuntu-latest + steps: + - name: Checkout 🛎️ + uses: actions/checkout@v2.3.1 + with: + persist-credentials: false + fetch-depth: 0 + + - name: Install dependencies and build docs 🧱 + run: | + cd docs + npm install + npm run build