Skip to content

[ci] patch previews #74

[ci] patch previews

[ci] patch previews #74

Workflow file for this run

# .github/workflows/preview.yml
name: Deploy PR previews
on:
pull_request:
types:
- opened
- reopened
- synchronize
- closed
jobs:
deploy-preview:
concurrency:
group: preview-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: write
pull-requests: write
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: oven-sh/setup-bun@v2
# this has to match docusaurus's baseURL in docusaurus.config.js
- run: echo "GH_ACTION_DOCUSAURUS_BASE_URL=pr-preview/pr-${{ github.event.number }}" >> "$GITHUB_ENV"
- name: Echo
run: echo preview-${{ github.ref }}
- name: Install and Build
if: github.event.action != 'closed' # You might want to skip the build if the PR has been closed
run: |
bun install --frozen-lockfile
bun run build
- name: Deploy preview
uses: rossjrw/[email protected]
with:
source-dir: ./build