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
10 changes: 7 additions & 3 deletions .github/workflows/preview.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
uses: actions/checkout@v4

- name: Checkout PR head
if: ${{ startsWith(github.event_name, 'pull_request') }}
if: ${{ startsWith(github.event_name, 'pull_request') && github.event.action != 'closed' }}
uses: actions/checkout@v4
with:
ref: refs/pull/${{ github.event.pull_request.number }}/merge
Expand All @@ -35,28 +35,32 @@ jobs:
uses: actions/setup-node@v4
if: ${{ github.event.action != 'closed' }} # Skipping these steps if the PR has been closed
with:
node-version-file: "package.json"
node-version-file: 'package.json'

- uses: pnpm/action-setup@v4
if: ${{ github.event.action != 'closed' }}
with:
version: 10
run_install: false

- name: Get pnpm store directory
id: pnpm-cache
if: ${{ github.event.action != 'closed' }}
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT

- uses: actions/cache@v4
name: Setup pnpm cache
if: ${{ github.event.action != 'closed' }}
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-V

- name: Install dependencies
if: ${{ github.event.action != 'closed' }}
run: pnpm install

# This will calculate the base URL for the website, based on the event that triggered the workflow.
Expand Down