-
Notifications
You must be signed in to change notification settings - Fork 11
50 lines (41 loc) · 1.01 KB
/
build_preview.yml
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 PR preview
on:
pull_request:
types:
- opened
- reopened
- synchronize
concurrency:
group: preview-${{ github.ref }}
cancel-in-progress: true
jobs:
build-preview:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/setup-python@v2
with:
python-version: 3.x
- name: Install dependencies
run: pip install -r requirements.txt
- name: Build
# builds to "site" directory by default
run: |
mkdocs build -f mkdocs.yml -d site
- name: Save PR number
run: |
mkdir -p ./pr
echo ${{ github.event.number }} > ./pr/NB
- uses: actions/upload-artifact@v2
with:
name: pr
path: pr/
- name: Save built site
run: |
mkdir -p ./pr_site
mv site ./pr_site/.
- uses: actions/upload-artifact@v2
with:
name: pr_site
path: pr_site/