Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add: PR Preview #1496

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
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
4 changes: 3 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,13 @@ jobs:
bun run build

- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@4.1.5
uses: JamesIves/github-pages-deploy-action@v4.7.2
if: success() && github.event_name != 'pull_request'
with:
branch: gh-pages
folder: dist
clean-exclude: pr-preview/
force: false

deploy-electron:
needs: test
Expand Down
34 changes: 34 additions & 0 deletions .github/workflows/preview.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Deploy PR previews
on:
pull_request:
types:
- opened
- reopened
- synchronize
- closed
concurrency: preview-${{ github.ref }}
jobs:
deploy-preview:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup Bun
if: github.event.action != 'closed'
uses: oven-sh/setup-bun@v1
with:
bun-version: latest
- name: Build and check
if: github.event.action != 'closed'
run: |
bun install --frozen-lockfile
bun run build
- name: Deploy preview
uses: rossjrw/pr-preview-action@v1
with:
source-dir: ./dist
preview-branch: gh-pages
umbrella-dir: pr-preview
action: auto
Loading