-
Notifications
You must be signed in to change notification settings - Fork 130
44 lines (39 loc) · 1.17 KB
/
pr-preview.yml
File metadata and controls
44 lines (39 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: Deploy PR previews
on:
pull_request:
types:
- opened
- reopened
- synchronize
paths:
- "website/**"
- ".github/actions/build-docs/action.yml"
- ".github/actions/setup-node-pnpm/action.yml"
- ".github/workflows/pr-preview.yml"
- "package.json"
- "pnpm-lock.yaml"
- "pnpm-workspace.yaml"
concurrency: preview-${{ github.ref }}
jobs:
deploy-preview:
if: github.event.pull_request.head.repo.full_name == github.repository
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
pages: write
steps:
- name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: true
- name: Build docs
uses: ./.github/actions/build-docs
with:
rspress-base: /${{ github.event.repository.name }}/pr-preview/pr-${{ github.event.number }}/
- name: Deploy preview
uses: rossjrw/pr-preview-action@ffa7509e91a3ec8dfc2e5536c4d5c1acdf7a6de9 # v1.8.1
with:
source-dir: website/doc_build
preview-branch: gh-pages
qr-code: true