-
Notifications
You must be signed in to change notification settings - Fork 8
45 lines (37 loc) · 1019 Bytes
/
pr-build.yaml
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
name: Pull Request Build
on:
pull_request:
branches: [master]
types: [opened, synchronize, reopened]
concurrency:
group: pr-build-${{ github.ref }}
cancel-in-progress: false
jobs:
preview:
runs-on: ubuntu-latest
steps:
- name: Checkout PR
uses: actions/checkout@v2
- name: Install Python
uses: actions/setup-python@v2
with:
python-version: 3.12
- name: Setup Python
run: |
python -m venv ./venv --clear
source ./venv/bin/activate
pip install -r ./requirements.txt
- name: Build docs
run: |
source ./venv/bin/activate
./build.sh
test -f ./docs/index.html # sanity check
- name: Save PR Number
run: echo ${{ github.event.number }} > ./docs/pr-number.txt
- name: Upload artifact
uses: actions/upload-artifact@v2
if: success()
with:
name: site
path: ./docs/
if-no-files-found: error