Skip to content

Deployment preview on Vercel #33

Deployment preview on Vercel

Deployment preview on Vercel #33

Workflow file for this run

name: Deploy PR previews
on:
pull_request:
types:
- opened
- reopened
- synchronize
- closed
branches:
- main
concurrency: preview-${{ github.ref }}
jobs:
deploy-preview:
runs-on: ubuntu-latest
steps:
# Check out the repository
- name: Checkout code
uses: actions/checkout@v4
# Install dependencies and build project
- name: Install dependencies and build
run: |
yarn install
yarn build:pr:preview
# Deploy to GitHub Pages
- uses: rossjrw/pr-preview-action@v1
if: github.event.action=='opened'|| github.event.action=='reopened'|| github.event.action=='synchronize'
with:
source-dir: ./build/
action: deploy
- uses: rossjrw/pr-preview-action@v1
if: github.event.action == 'closed' || github.event.pull_request.merged
with:
source-dir: ./build/
action: remove