-
Notifications
You must be signed in to change notification settings - Fork 0
33 lines (29 loc) · 854 Bytes
/
preview.yml
File metadata and controls
33 lines (29 loc) · 854 Bytes
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
# .github/workflows/preview.yml
# need --legacy-peer-deps because craco has a peer dep for react-scripts v4. But it works locally
name: PR Preview
on:
pull_request:
types:
- opened
- reopened
- synchronize
- closed
concurrency: preview-${{ github.ref }}
jobs:
deploy-preview:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v3
with:
persist-credentials: false
- name: Install and Build
run: |
mkdir bin
curl -sSL https://github.com/rust-lang/mdBook/releases/download/v0.4.18/mdbook-v0.4.18-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=bin
ls -lh **/*
./bin/mdbook build
- name: Deploy preview
uses: rossjrw/pr-preview-action@v1
with:
source-dir: ./book