Build tailwind website instead of using the dev version, add job that checks that built things are committed #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
| # Guard for the "committed artifacts" model: rendered post HTML and the | |
| # compiled Tailwind stylesheet are committed and served as-is from main, so | |
| # this check regenerates both and fails if the committed copies are stale | |
| # (someone edited a .qmd or markup and forgot `make build`). | |
| # It is a check only — deploys remain "push to main", no build step. | |
| name: check | |
| on: | |
| pull_request: | |
| push: | |
| branches: [main] | |
| jobs: | |
| artifacts-in-sync: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/cache@v4 | |
| with: | |
| path: .tools | |
| key: quarto-${{ runner.os }}-${{ hashFiles('Makefile') }} | |
| - run: make setup | |
| - run: make build | |
| - name: fail if committed artifacts are stale | |
| run: | | |
| if [ -n "$(git status --porcelain)" ]; then | |
| git status | |
| git diff | head -100 | |
| echo "::error::Committed artifacts don't match sources — run 'make build' locally and commit the result." | |
| exit 1 | |
| fi |