-
-
Notifications
You must be signed in to change notification settings - Fork 3
55 lines (46 loc) · 1.48 KB
/
pr-docs.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
51
52
53
54
55
name: Deploy PR preview docs
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
pull_request:
types:
- opened
- reopened
- synchronize
- closed
permissions:
contents: write
pull-requests: write
jobs:
deploy-docs-preview:
runs-on: ubuntu-latest
steps:
- name: Fetch merge branch
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
with:
ref: ${{ github.event.pull_request.head.sha }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
submodules: "true"
- name: Set up Python 3.9
if: github.event.action != 'closed'
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3
with:
python-version: "3.9"
- name: install prerequisites
if: github.event.action != 'closed'
run: |
python -m pip install --upgrade pip wheel
python -m pip install -r ./piped/python/base-requirements/nox.txt
- name: Build docs
if: github.event.action != 'closed'
run: |
mkdir site
python -m nox -s generate-docs -- -o ./site
- name: Deploy preview
uses: FasterSpeeding/pr-preview-action@task/override-committer
with:
git-config-email: "120557446+always-on-duty[bot]@users.noreply.github.com"
git-config-name: "always-on-duty[bot]"
preview-branch: docs
source-dir: ./site/