ente/.github/workflows/docs-verify-build.yml
Manav Rathi fa3f249a7a
[meta] Omit unnecessary reruns of workflows when deploying
When we merge main into a deploy/* branch
(e.g. https://github.com/ente-io/ente/pull/1147), all changes get pulled in not
just the one related to that deployment, and this causes almost all of the path
based workflows to run again unnecessarily. Exclude the various "deploy/**"
branches to stop these unnecessary workflows from being triggered.
2024-03-19 12:59:04 +05:30

37 lines
985 B
YAML

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, "deploy/**"]
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