Skip to content

Commit 18be168

Browse files
committed
feat: preview workflow
1 parent 19b6def commit 18be168

1 file changed

Lines changed: 43 additions & 0 deletions

File tree

‎.github/workflows/preview.yml‎

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Deploy PR previews
2+
3+
on:
4+
pull_request:
5+
types:
6+
- opened
7+
- reopened
8+
- synchronize
9+
- closed
10+
11+
concurrency: preview-${{ github.ref }}
12+
13+
jobs:
14+
deploy-preview:
15+
runs-on: ubuntu-latest
16+
if: github.event.action != 'closed'
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v4
20+
with:
21+
fetch-depth: 0
22+
23+
- name: Setup bun
24+
uses: oven-sh/setup-bun@v2
25+
26+
- name: Cache bun dependencies
27+
uses: actions/cache@v4
28+
with:
29+
path: ~/.bun/install/cache
30+
key: ${{ runner.os }}-bun-web-${{ hashFiles('bun.lockb') }}
31+
restore-keys: |
32+
${{ runner.os }}-bun-web-
33+
34+
- name: Install dependencies
35+
run: bun install
36+
37+
- name: Build website
38+
run: bun run build
39+
40+
- name: Deploy preview
41+
uses: rossjrw/pr-preview-action@v1
42+
with:
43+
source-dir: ./build/

0 commit comments

Comments
 (0)