From 976a76ae23e4afb351812b4dba50c8df7b4e48b5 Mon Sep 17 00:00:00 2001 From: Manav Rathi Date: Mon, 11 Mar 2024 10:59:47 +0530 Subject: [PATCH] [docs] Add a workflow to do a preflight verification of build on each PR --- .github/workflows/docs-verify-build.yml | 37 +++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/docs-verify-build.yml diff --git a/.github/workflows/docs-verify-build.yml b/.github/workflows/docs-verify-build.yml new file mode 100644 index 0000000000..addb52a059 --- /dev/null +++ b/.github/workflows/docs-verify-build.yml @@ -0,0 +1,37 @@ +name: "Verify build (docs)" + +# Preflight build of docs. This allows us to ensure that yarn build is +# succeeding before we merge the PR into main. + +on: + # Run on every push to a branch other than main that changes docs/ + push: + branches-ignore: [main] + paths: + - "docs/**" + - ".github/workflows/docs-verify-build.yml" + +jobs: + verify-build: + runs-on: ubuntu-latest + + defaults: + run: + working-directory: docs + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup node and enable yarn caching + uses: actions/setup-node@v4 + with: + node-version: 20 + cache: "yarn" + cache-dependency-path: "docs/yarn.lock" + + - name: Install dependencies + run: yarn install + + - name: Build production site + run: yarn build