feat: per-product verticals, self-host rewrite, and product theming #1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| pull_request: | |
| push: | |
| branches: [main] | |
| concurrency: | |
| group: ci-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: pnpm/action-setup@v4 | |
| with: | |
| version: 10.13.1 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: pnpm | |
| - run: pnpm install --frozen-lockfile | |
| # No sibling checkouts in CI, so assemble links every product to its | |
| # committed vendor/<product> bundle. A missing bundle fails here with an | |
| # actionable message rather than silently building a site with no docs. | |
| - name: Assemble docs sources | |
| run: pnpm assemble | |
| - name: Check sitemap consistency | |
| run: pnpm check:sitemap | |
| - name: Build | |
| run: pnpm build | |
| vendor-guard: | |
| # vendor/ is written only by the sync-docs action. A human edit here is | |
| # silently overwritten on the next sync, so reject it at review time. | |
| if: github.event_name == 'pull_request' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Reject hand edits under vendor/ | |
| env: | |
| BASE: ${{ github.event.pull_request.base.sha }} | |
| HEAD: ${{ github.event.pull_request.head.sha }} | |
| AUTHOR: ${{ github.event.pull_request.user.login }} | |
| run: | | |
| set -euo pipefail | |
| case "$AUTHOR" in | |
| *"[bot]"|rivet-docs-sync*) echo "sync bot; skipping"; exit 0 ;; | |
| esac | |
| changed=$(git diff --name-only "$BASE" "$HEAD" -- vendor/ || true) | |
| if [ -n "$changed" ]; then | |
| echo "::error::vendor/ is generated by the sync-docs action. Edit the docs in the product repo instead." | |
| echo "$changed" | sed 's/^/ /' | |
| exit 1 | |
| fi | |
| echo "vendor/ untouched" |