Skip to content

Add deployment preview to PRs #22

Add deployment preview to PRs

Add deployment preview to PRs #22

Workflow file for this run

name: Test deployment
on:
pull_request:
workflow_dispatch:
jobs:
test-deploy:
permissions:
pages: write
id-token: write
contents: write
pull-requests: write
name: Test deployment
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- name: Install dependencies
run: npm install --frozen-lockfile
- name: Test build website
run: |
npm run build
npm run build:docs
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: build/docs/gatsby/public
destination_dir: preview/pr-${{ github.event.number }}
force_orphan: true