Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions .github/workflows/preview.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Deploy PR Preview

on:
pull_request:
types:
- opened
- reopened
- synchronize
- closed

permissions:
contents: write
pull-requests: write
issues: write

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
deploy-preview:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
lfs: true

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 10

- name: Install dependencies
if: github.event.action != 'closed'
run: pnpm install

- name: Set preview base uri
if: github.event_name == 'pull_request'
run: |
echo "NEXT_PUBLIC_BASE_PATH=/pr-preview/pr-${{ github.event.pull_request.number }}" >> $GITHUB_ENV

- name: Build with Next.js
if: github.event.action != 'closed'
run: pnpm build

- name: Deploy Preview
uses: rossjrw/pr-preview-action@v1
with:
source-dir: ./out
Binary file modified public/images/pochi.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.