From 0641a86e5f7f2355d27fbd62edb08de4b83320b4 Mon Sep 17 00:00:00 2001 From: JP Hastings-Spital Date: Sun, 12 Nov 2023 08:03:34 +0000 Subject: [PATCH] Test no syndication changes build --- .github/workflows/publish.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 9670714d..32d7d39b 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -58,6 +58,23 @@ jobs: --cacheDir /tmp/hugo/cache \ --minify \ --baseURL "https://www.byjp.me" + - name: Syndicate + run: | + cd tools/syndicate + go run . + if git diff-index --quiet HEAD; then + echo "No syndication changes made" + elif + echo "Committing syndication changes" + git config --global user.email "github-actions[bot]@users.noreply.github.com" + git config --global user.name "Syndicate[bot]" + git commit -am "Syndicated post references" + git push + // TODO: Do not upload, but without failing + exit 1 + fi + - name: Build search index + run: | # Build the search index npm_config_yes=true npx pagefind@latest - name: Upload artifact