Skip to content

Commit

Permalink
Fix GitHub preview action:
Browse files Browse the repository at this point in the history
 - Checkout the branch from the PR, not the default branch
 - Use the tikkun.io domain name for the link
  • Loading branch information
SLaks committed Sep 30, 2024
1 parent 31a9c98 commit ef720c9
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/pr-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@ jobs:
with:
script: |
const githubEventName = "${{ github.event_name }}";
const githubRepositoryOwner = "${{ github.repository_owner }}"; // owner
const githubRepositoryName = "${{ github.event.repository.name }}"; // repo
const repositoryBaseUrl = '';
if (githubEventName === "push") {
const githubBranchName = "${{ github.ref_name }}"; // branch
Expand All @@ -72,6 +70,9 @@ jobs:

- name: Checkout
uses: actions/checkout@v3
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}

- name: Setup Node.js
uses: actions/setup-node@v3
Expand Down Expand Up @@ -102,4 +103,4 @@ jobs:
source-dir: ./${{ steps.folder.outputs.result }}
preview-branch: gh-pages
umbrella-dir: pr-preview
# custom-url: ${{ inputs.custom-url }}
custom-url: tikkun.io

0 comments on commit ef720c9

Please sign in to comment.