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
13 changes: 12 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,23 @@ jobs:
ruby-version: 3.3.4
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: Build Jekyll website
env:
EVENT_NAME: ${{ github.event_name }}
PR_NUMBER: ${{ github.event.pull_request.number }}
run: |
set -xo pipefail
rm -rf _site/*
gem install bundler -v 2.6.3
bundle install
bundle exec jekyll build
config=_config.yml
if [ "$EVENT_NAME" = "pull_request" ]; then
# Absolute links (site.url) must point at the preview deployment,
# not at the production site. The alias matches the
# --branch=pr-<number> used by the preview job.
echo "url: https://pr-${PR_NUMBER}.aeamain.pages.dev" > "$RUNNER_TEMP/_config_preview.yml"
config="$config,$RUNNER_TEMP/_config_preview.yml"
fi
bundle exec jekyll build --config "$config"
- name: Generate agent instruction file
run: python3 .github/scripts/generate_agent_md.py
- name: Upload site artifact
Expand Down
1 change: 1 addition & 0 deletions README-DEPLOYMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ Once the secrets exist, every PR from a repo branch (not a fork) will get:

- A live preview at a Cloudflare Pages URL specific to that PR
(`--branch=pr-<PR number>`), rebuilt on every push to the PR.
- A site built with `url` set to that preview URL, so absolute links stay on the preview instead of pointing at production
- A PR comment with the preview link, edited in place on each new commit
rather than re-posted.

Expand Down
Loading