Skip to content
Merged
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/build-preview.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,23 @@ jobs:
- name: Debug dump
uses: crazy-max/ghaction-dump-context@v2

- name: Checkout branch contents
- name: Checkout pull request branch
if: github.event.action != 'closed'
uses: actions/checkout@v4
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.head_ref }}

# The head branch may already be deleted when a pull request closes.
# Check out the stable base branch so the preview action can remove the
# temporary preview without trying to fetch a branch that no longer exists.
- name: Checkout base branch for preview cleanup
if: github.event.action == 'closed'
uses: actions/checkout@v4
with:
repository: ${{ github.event.pull_request.base.repo.full_name }}
ref: ${{ github.event.pull_request.base.ref }}

- name: Install Ruby packages
if: github.event.action != 'closed'
uses: ruby/setup-ruby@v1
Expand Down
Loading