Skip to content

Veight blog rescue

Veight blog rescue #27

Workflow file for this run

# .github/workflows/preview.yml
name: Deploy PR previews
on:
pull_request_target:
types:
- opened
- reopened
- synchronize
- closed
concurrency: preview-${{ github.ref }}
jobs:
deploy-preview:
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: 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/pr-preview-action@v1
with:
source-dir: ./build