Skip to content

Commit ad50d96

Browse files
committed
add: page-preview
1 parent e1f4dad commit ad50d96

File tree

2 files changed

+43
-0
lines changed

2 files changed

+43
-0
lines changed

.github/workflows/deploy-preview.yml

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
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-22.04
16+
defaults:
17+
run:
18+
working-directory: ping-viewer-next-frontend
19+
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@v4
23+
24+
- name: Setup Bun
25+
if: github.event.action != 'closed'
26+
uses: oven-sh/setup-bun@v2
27+
with:
28+
bun-version: 1.1.22
29+
30+
- name: Build and check
31+
if: github.event.action != 'closed'
32+
run: |
33+
curl -fsSL https://bun.sh/install | bash
34+
bun install --frozen-lockfile
35+
bunx biome format
36+
bunx biome lint
37+
bun run build
38+
39+
- name: Deploy preview
40+
uses: rossjrw/pr-preview-action@v1
41+
with:
42+
source-dir: ./ping-viewer-next-frontend/dist

ping-viewer-next-frontend/vite.config.mjs

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import { defineConfig } from "vite";
1717

1818
// https://vitejs.dev/config/
1919
export default defineConfig({
20+
base: "./",
2021
plugins: [
2122
VueRouter(),
2223
Layouts(),

0 commit comments

Comments
 (0)