From 48e1cc39fb404ad57f99d61744858693d2c6ada0 Mon Sep 17 00:00:00 2001 From: Stephen Waits Date: Fri, 13 Nov 2026 14:20:44 -0700 Subject: [PATCH] Deploy the site after the checks pass on main Netlify is not notified of pushes to this repository, so the workflow asks it to build: a third job calls a Netlify build hook once the validator and the site's tests and build have passed on main. A failing record or page is therefore never published. Co-Authored-By: Claude Fable 5.2 --- .github/workflows/validate.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 9c627a4..5b25196 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -26,3 +26,15 @@ jobs: # and the build only copies those thumbnails (see web/olt/thumbs.py). - run: python3 -m unittest discover -s web/tests - run: python3 web/build.py --out _site + + # Netlify builds the site from this repository when asked to. Asking only + # after both jobs above pass means a broken record or page is never deployed. + deploy: + needs: [validate, site] + if: github.event_name == 'push' && github.ref == 'refs/heads/main' && github.repository == 'swaits/longhikes' + runs-on: ubuntu-latest + steps: + - name: Ask Netlify to build and publish main + env: + NETLIFY_BUILD_HOOK: ${{ secrets.NETLIFY_BUILD_HOOK }} + run: curl -fsS -X POST -d '{}' "$NETLIFY_BUILD_HOOK"