Skip to content

fix(security): PR Previews from Forks #1

fix(security): PR Previews from Forks

fix(security): PR Previews from Forks #1

Workflow file for this run

name: Build Preview Deployment
on:
pull_request:
types: [opened, synchronize]
# cancel in-progress runs on new commits to same PR (github.event.number)
concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.sha }}
cancel-in-progress: true
jobs:
build-preview:
runs-on: ubuntu-latest
name: Build Preview Site and Upload Build Artifact
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20.15.0
cache: npm
- name: Install dependencies
run: npm install
- name: Build dist folder
run: npm run generate
# Uploads the build directory as a workflow artifact
- name: Upload build artifact
uses: actions/upload-artifact@v4
with:
name: preview-build
path: ./dist