-
Notifications
You must be signed in to change notification settings - Fork 216
50 lines (41 loc) · 1.1 KB
/
build-preview.yml
File metadata and controls
50 lines (41 loc) · 1.1 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
45
46
47
48
49
50
name: Build Preview Deployment
on:
pull_request:
types: [opened, synchronize]
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
name: Publish to Cloudflare Pages
steps:
- name: Checkout
uses: actions/checkout@v4
- run: |
npm install -g corepack@latest
corepack enable
- uses: actions/setup-node@v4
with:
node-version: 22.x
cache: pnpm
- name: Install dependencies
run: pnpm install
working-directory: .
- name: Retrieve Docusaurus build cache
uses: actions/cache@v4
with:
path: node_modules/.cache/rspack
key: docusaurus-${{ github.ref_name }}
restore-keys: |
docusaurus-${{ github.ref_name }}
docusaurus-master
- name: Build static
run: pnpm build
env:
BASE_URL: /
# Uploads the build directory as a workflow artifact
- name: Upload build artifact
uses: actions/upload-artifact@v4
with:
name: preview-build
path: build