Skip to content

feat(2.0): split into multiple modules #68

feat(2.0): split into multiple modules

feat(2.0): split into multiple modules #68

name: 'Docs: Build Preview Deployment'
env:
BASE_DIR: docs
on:
pull_request:
types: [ opened, synchronize ]
jobs:
build-preview:
runs-on: ubuntu-latest
name: Build Preview Site and Upload Build Artifact
defaults:
run:
working-directory: ${{ env.BASE_DIR }}
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
- name: Install bun
uses: oven-sh/setup-bun@v2
with:
bun-version-file: 'package.json'
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Build
run: bun run build
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Copy cloudflare configuration files to build directory
run: |
cp _headers dist/
cp _redirects dist/
- name: Upload build artifact
uses: actions/upload-artifact@v4
with:
name: preview-build
path: ./docs/dist
if-no-files-found: error