diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml new file mode 100644 index 0000000..12cda4e --- /dev/null +++ b/.github/workflows/build-test.yml @@ -0,0 +1,45 @@ +name: Build Test + +# Mirrors the build steps from deploy-docs.yml so that any PR that would +# break the deploy fails CI here first. Runs unconditionally on every PR +# and every push to main, providing the always-on required status check +# for branch protection. The deploy-only steps (WordPress upload, +# translation, GitHub release) are not exercised — they require live +# external services and run only on tag. + +on: + push: + branches: + - main + pull_request: + +jobs: + build: + name: Build governance docs + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 + + - name: Install pandoc + uses: pandoc/actions/setup@86321b6dd4675f5014c611e05088e10d4939e09e # v1.1.1 + + - name: Setup Node.js + uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6 + with: + node-version: '24' + cache: 'npm' + + - name: Install npm dependencies + run: npm ci + env: + PUPPETEER_SKIP_DOWNLOAD: 'true' + + - name: Build standalone HTML pages + run: npm run build:html + + - name: Build combined PDF + run: npm run build:pdf + env: + PUPPETEER_EXECUTABLE_PATH: /usr/bin/google-chrome-stable