ci: 使用 pkg-pr-new 预发布 PR 并生成预览模板 (#2175)

* ci: 使用 pkg-pr-new 预发布 PR 并生成预览模板

* update

* update

* update

* ci: 更换文件名

---------

Co-authored-by: 贤心 <3277200+sentsim@users.noreply.github.com>
This commit is contained in:
morning-star
2024-08-20 00:01:36 +08:00
committed by GitHub
parent 7aeb992706
commit d9635625e1
5 changed files with 65 additions and 0 deletions

23
.github/workflows/pr-preview.yml vendored Normal file
View File

@@ -0,0 +1,23 @@
name: Publish Pull Request Preview
on: [pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install dependencies
run: npm install
- name: Build
run: npm run build
- run: npx pkg-pr-new publish --template './examples/pr-preview'