Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`)

<!-- uncomment this if PR is for a new AEP

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
16 changes: 14 additions & 2 deletions scripts/build.sh
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Loading