Skip to content

Commit

Permalink
[+] Try preview deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
sauricat committed Sep 17, 2024
1 parent 546ed40 commit c4ec50a
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/preview.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Deploy PR Previews

on:
push:
branches:
- main # Set a branch to deploy
pull_request:
types:
- opened
- synchronize

jobs:
deploy-preview:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod

- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 8
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
cache: 'pnpm'

- name: Install dependencies
run: pnpm i
- name: Build page
run: pnpm docs:build

- name: Deploy PR Preview
uses: rossjrw/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN}}
preview-branch: main
source-dir: .
umbrella-dir: pr-preview
action: auto

0 comments on commit c4ec50a

Please sign in to comment.