From bffb7ba60b385148a56397df6393670d10854622 Mon Sep 17 00:00:00 2001 From: kalexieva Date: Wed, 25 Mar 2026 13:59:29 -0700 Subject: [PATCH 1/2] Switch site-generator clone to HTTPS and auto-update local checkout - update `scripts/build.sh` to use fail-fast shell options (`set -euo pipefail`) - replace SSH clone URL with HTTPS for CI compatibility. GitHub Actions can't clone the repo via SSH. - when `/tmp/site-generator` already exists, set origin and run `git pull --ff-only` so local and CI runs use the latest generator state - update `.github/workflows/test.yaml` to use `actions/checkout@v4` --- .github/workflows/test.yaml | 2 +- scripts/build.sh | 16 ++++++++++++++-- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index bb7aeb08..bb2bd0b9 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -9,6 +9,6 @@ jobs: runs-on: ubuntu-latest container: node:24 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Generate all static pages, and build site. run: ./scripts/build.sh diff --git a/scripts/build.sh b/scripts/build.sh index 96daa7c7..eb75e2bf 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -1,10 +1,22 @@ #!/usr/bin/env bash -set -x +set -euo pipefail export AEP_LOCATION="${PWD}" export SG_DIRECTORY="/tmp/site-generator" +export SG_REPO_URL="${SG_REPO_URL:-https://github.com/infusionsoft/aep-site-generator.git}" if [ ! -d "${SG_DIRECTORY}" ]; then - git clone git@github.com:infusionsoft/aep-site-generator.git "${SG_DIRECTORY}" + git clone "${SG_REPO_URL}" "${SG_DIRECTORY}" +else + # Keep local builds aligned with the latest upstream state. + git -C "${SG_DIRECTORY}" remote set-url origin "${SG_REPO_URL}" + if ! git -C "${SG_DIRECTORY}" pull --ff-only; then + echo "Error: unable to fast-forward ${SG_DIRECTORY}." >&2 + echo "This usually means local changes or branch divergence in the cached checkout." >&2 + echo "Fix it by resetting the cache or reconciling the repo, then rerun build:" >&2 + echo " rm -rf \"${SG_DIRECTORY}\"" >&2 + echo " ./scripts/build.sh" >&2 + exit 1 + fi fi cd "${SG_DIRECTORY}" || exit From 53e334c5e569a9b68224ba0c1f9385402d893fea Mon Sep 17 00:00:00 2001 From: kalexieva Date: Wed, 25 Mar 2026 14:00:10 -0700 Subject: [PATCH 2/2] fix linting error in PR template --- .github/PULL_REQUEST_TEMPLATE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index bd129840..2edba39f 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -26,7 +26,7 @@ contributing to this repository. [references AEPs](https://aep.dev/style-guide#referencing-aeps) correctly. - [ ] [My code has been formatted](https://aep.dev/contributing#formatting) - (run `make lint`) + (run `make lint`)