From 33d9f4aa1990278dd7e161c490c771f5ea46e9af Mon Sep 17 00:00:00 2001 From: me-no-dev Date: Tue, 16 Mar 2021 02:48:17 +0200 Subject: [PATCH] Update GitHub Pages Builder Add some debug and allow building from a branch named `pages` --- .github/scripts/on-pages.sh | 6 ++++++ .github/workflows/gh-pages.yml | 3 +++ 2 files changed, 9 insertions(+) diff --git a/.github/scripts/on-pages.sh b/.github/scripts/on-pages.sh index 1b265f91..e4ef4f30 100644 --- a/.github/scripts/on-pages.sh +++ b/.github/scripts/on-pages.sh @@ -87,9 +87,15 @@ function git_safe_upload_to_pages(){ EVENT_JSON=`cat $GITHUB_EVENT_PATH` +echo "GITHUB_EVENT_PATH: $GITHUB_EVENT_PATH" +echo "EVENT_JSON: $EVENT_JSON" + pages_added=`echo "$EVENT_JSON" | jq -r '.commits[].added[]'` +echo "added: $pages_added" pages_modified=`echo "$EVENT_JSON" | jq -r '.commits[].modified[]'` +echo "modified: $pages_modified" pages_removed=`echo "$EVENT_JSON" | jq -r '.commits[].removed[]'` +echo "removed: $pages_removed" for page in $pages_added; do if [[ $page != "README.md" && $page != "docs/"* ]]; then diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index f111f3aa..adb0a590 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -4,9 +4,12 @@ on: push: branches: - master + - pages paths: - 'README.md' - 'docs/**' + - '.github/scripts/on-pages.sh' + - '.github/workflows/gh-pages.yml' jobs: