Skip to content

Commit

Permalink
Update preview-docs.yml
Browse files Browse the repository at this point in the history
Use pull_request_target to be able to access FERN publication secret
  • Loading branch information
imartinez authored Nov 25, 2023
1 parent c6d6e0e commit e8d88f8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/preview-docs.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: deploy preview docs

on:
pull_request:
pull_request_target:
branches:
- main
paths:
Expand All @@ -28,7 +28,7 @@ jobs:
env:
FERN_TOKEN: ${{ secrets.FERN_TOKEN }}
run: |
output=$(fern generate --docs --preview --log-level debug)
output=$(fern generate --docs --preview)
echo "$output"
# Extract the URL
preview_url=$(echo "$output" | grep -oP '(?<=Published docs to )https://[^\s]*')
Expand Down

0 comments on commit e8d88f8

Please sign in to comment.