add redirects from docs.alchemy.com to alchemy.com/docs #320
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Preview Docs | |
on: pull_request | |
jobs: | |
run: | |
runs-on: ubuntu-22.04 | |
permissions: | |
contents: read | |
deployments: write | |
pull-requests: write | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Add aa-sdk docs to fern | |
uses: ./.github/actions/insert-wallets-tab | |
- name: Set Build Comment to In Progress | |
uses: actions/github-script@v7 | |
with: | |
script: | | |
const workspace = process.env.GITHUB_WORKSPACE; | |
const { updatePreviewComment } = await import(`${workspace}/scripts/preview-comment.js`); | |
await updatePreviewComment({ | |
github, | |
context, | |
status: 'building', | |
}); | |
- name: Generate Preview | |
uses: ./.github/actions/publish-fern | |
id: preview | |
with: | |
github-token: ${{ github.token }} | |
fern-token: ${{ secrets.FERN_TOKEN }} | |
environment: docs-preview | |
ref: ${{ github.head_ref }} | |
preview: "true" | |
- name: Comment Preview URL in PR | |
uses: actions/github-script@v7 | |
if: always() | |
with: | |
script: | | |
const workspace = process.env.GITHUB_WORKSPACE; | |
const { updatePreviewComment } = await import(`${workspace}/scripts/preview-comment.js`); | |
await updatePreviewComment({ | |
github, | |
context, | |
previewUrl: '${{ steps.preview.outputs.url }}', | |
status: '${{ steps.preview.outcome }}', | |
}); |