generated from readthedocs/tutorial-template
-
Notifications
You must be signed in to change notification settings - Fork 38
130 lines (105 loc) · 3.62 KB
/
pull-request.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
name: "Pull Request Docs Check"
on:
- pull_request
jobs:
build-pdf:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Refresh Packages
run: sudo apt-fast -y update
- name: Install Dependencies
run: xargs -a dependencies sudo apt-fast install -y
- name: Python Setup
uses: actions/setup-python@v4
with:
python-version: 3.8
cache: 'pip'
- name: Python Install Dependencies
run: pip install -r docs/requirements.txt
- name: Build PDF
env:
SPHINXOPTS: "-D html_context.commit=${{ github.sha }} -D version=latest -A display_github=true -A github_user=${{ github.repository_owner }} -A github_repo=${{ github.event.repository.name }} -A github_version=${{ github.ref_name }} -A conf_py_path=/docs/source/"
run: make -C docs/ latexpdf
- name: Archive PDF
env:
PR_NUMBER: ${{ github.event.number }}
ID: ${{ github.run_attempt }}
uses: actions/upload-artifact@v3
with:
name: FTCDOCS-PDF
path: |
docs/build/latex/*.pdf
FTCDOCS-PR-${{ env.PR_NUMBER }}-${{ env.ID }}
if-no-files-found: error
build-html:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Refresh Packages
run: sudo apt-fast -y update
- name: Python Setup
uses: actions/setup-python@v4
with:
python-version: 3.8
cache: 'pip'
- name: Python Install Dependencies
run: pip install -r docs/requirements.txt
- name: Build Site
env:
SPHINXOPTS: "-D html_context.commit=${{ github.sha }} -D version=latest -A display_github=true -A github_user=${{ github.repository_owner }} -A github_repo=${{ github.event.repository.name }} -A github_version=${{ github.ref_name }} -A conf_py_path=/docs/source/"
run: make -C docs/ html
- name: Archive Site
uses: actions/upload-artifact@v3
with:
name: FTCDOCS-HTML
path: 'docs/build/html'
if-no-files-found: error
spelling-check:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- uses: reviewdog/action-misspell@v1
with:
locale: "US"
reporter: "github-check"
link-check:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Python Setup
uses: actions/setup-python@v4
with:
python-version: 3.8
cache: 'pip'
- name: Python Install Dependencies
run: pip install -r docs/requirements.txt
- name: link-check
run: make -C docs/ linkcheck SPHINXOPTS="-W --keep-going -n -q"
- name: Archive Log
if: ${{ failure() }}
uses: actions/upload-artifact@v2
env:
PR_NUMBER: ${{ github.event.number }}
ID: ${{ github.run_attempt }}
with:
name: LINKCHECK
path: docs/build/linkcheck/output.txt
retention-days: 7
image-check:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Python Setup
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Python Install Dependencies
run: pip install -r docs/requirements.txt
- name: image-check
run: make -C docs/ imagecheck