From 02e989b733a42330d9f5c6b7fc51262f4a04fef7 Mon Sep 17 00:00:00 2001 From: Kenneth Mark Dsouza Date: Thu, 17 Sep 2026 17:21:56 +0530 Subject: [PATCH] Rebuild when the AI projects list changes The homepage's Projects letter is scraped from kenneth.dsouza.im/ai at build time, so projects added in inosaint/ai stayed invisible here until something else happened to push master. The last such gap ran two weeks and hid three projects. Accept a repository_dispatch (projects-updated) from that repo, plus a workflow_dispatch button for refreshing by hand. The deploy gate flips from "is a push" to "is not a pull_request" so both new triggers reach it; the branch check still keeps it to master, which is where dispatches land anyway. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01KWNyAfb9D1hp8ZJj3whaGv --- .github/workflows/build.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9ebcb07f..3398c987 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -7,6 +7,13 @@ on: pull_request: branches: - master + # Fired by inosaint/ai when its project list changes. The homepage's Projects + # letter is scraped from that site at BUILD time (see astro-site/src/pages/index.astro), + # so a new project only reaches the homepage once this repo rebuilds. + repository_dispatch: + types: [projects-updated] + # Manual button in the Actions tab, for refreshing without a commit. + workflow_dispatch: jobs: build: @@ -37,8 +44,9 @@ jobs: path: astro-site/dist/ deploy: - # Only deploy on pushes to master branch - if: github.event_name == 'push' && github.ref == 'refs/heads/master' + # Deploy on master pushes, on a manual run, and when the AI projects repo + # says its list changed. Never on pull_request — that builds only. + if: github.event_name != 'pull_request' && github.ref == 'refs/heads/master' needs: build runs-on: ubuntu-latest