Skip to content

Commit

Permalink
Update preview-docs.yml (#319)
Browse files Browse the repository at this point in the history
This PR proposes an update to the preview link workflow so that preview links will generate using the PR context

Signed-off-by: Fern Support <[email protected]>
  • Loading branch information
fern-support authored Dec 19, 2024
1 parent aab3a7d commit c36e914
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/preview-docs.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,28 @@
name: preview-docs

on:
pull_request:
pull_request_target:
branches:
- main

jobs:
run:
runs-on: ubuntu-latest
permissions: write-all
permissions:
pull-requests: write # Only for commenting
contents: read # For checking out code
steps:
- name: Checkout repository
uses: actions/checkout@v4
# with:
# ref: "${{ github.event.pull_request.merge_commit_sha }}"

- name: Checkout PR
if: github.event_name == 'pull_request_target'
run: |
git fetch origin pull/${{ github.event.pull_request.number }}/head:pr-${{ github.event.pull_request.number }}
git checkout pr-${{ github.event.pull_request.number }}
- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
Expand Down

0 comments on commit c36e914

Please sign in to comment.