Skip to content

Commit 1c088d9

Browse files
committed
Add PR preview workflow
1 parent 3f2873d commit 1c088d9

2 files changed

Lines changed: 23 additions & 0 deletions

File tree

.github/workflows/pr-preview.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Build PR Preview
2+
3+
on:
4+
pull_request:
5+
types: [opened, reopened, synchronize, closed]
6+
7+
permissions:
8+
contents: write
9+
pull-requests: write
10+
11+
concurrency: ci-${{ github.ref }}
12+
13+
jobs:
14+
build-deploy-and-preview:
15+
name: Build, Deploy to GitHub Pages and Deploy PR Preview
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Build, Deploy to GitHub Pages and Deploy PR Preview
19+
uses: chvmvd/build-deploy-and-preview-action@v1.2.0
20+
with:
21+
type: vite

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@
7171

7272
本项目采用 GitHub Actions 自动化部署到 GitHub Pages,每次推送到主分支时自动构建和部署。
7373

74+
同时,每个 Pull Request 都会自动构建并生成预览页面,方便审核。
75+
7476
如需 fork 此项目进行自定义开发:
7577

7678
1. Fork 本仓库到你的 GitHub 账户

0 commit comments

Comments
 (0)