migrate to core only
This commit is contained in:
37
.github/workflows/fern-docs-preview.yml
vendored
Normal file
37
.github/workflows/fern-docs-preview.yml
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
name: Preview Docs
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- 'fern/**'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
||||
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
|
||||
|
||||
jobs:
|
||||
run:
|
||||
runs-on: [self-hosted, small]
|
||||
permissions: write-all
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: true
|
||||
|
||||
- name: Generate preview URL
|
||||
id: generate-docs
|
||||
working-directory: fern
|
||||
env:
|
||||
FERN_TOKEN: ${{ secrets.FERN_TOKEN }}
|
||||
run: |
|
||||
OUTPUT=$(fern generate --docs --preview 2>&1) || true
|
||||
echo "$OUTPUT"
|
||||
URL=$(echo "$OUTPUT" | grep -oP 'Published docs to \K.*(?= \()')
|
||||
echo "Preview URL: $URL"
|
||||
echo "🌿 Preview your docs: $URL" > preview_url.txt
|
||||
|
||||
- name: Comment URL in PR
|
||||
uses: thollander/actions-comment-pull-request@v3
|
||||
with:
|
||||
file-path: fern/preview_url.txt
|
||||
Reference in New Issue
Block a user