forked from NatLabRockies/Exagoop
-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (51 loc) · 1.83 KB
/
Copy pathdocs.yml
File metadata and controls
53 lines (51 loc) · 1.83 KB
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
name: ExaGOOP-Docs
on:
workflow_dispatch:
push:
branches: [main]
paths:
- 'Docs/**'
- '.github/workflows/docs.yml'
pull_request:
branches: [main]
paths:
- 'Docs/**'
- '.github/workflows/docs.yml'
jobs:
Docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Dependencies
run: |
python -m pip install --upgrade pip
pip install sphinx sphinx_rtd_theme sphinxcontrib-bibtex
- name: Build
run: |
echo "::add-matcher::.github/problem-matchers/sphinx.json"
mkdir -p ${{runner.workspace}}/build-docs/html
sphinx-build -b html \
${{github.workspace}}/Docs/sphinx/manual/ \
${{runner.workspace}}/build-docs/html \
2>&1 | tee ${{runner.workspace}}/build-docs/build-output.txt
touch ${{runner.workspace}}/build-docs/html/.nojekyll
- name: Report
run: |
grep -E "WARNING:|Warning:|warning:|ERROR:|Error:|error:" \
${{runner.workspace}}/build-docs/build-output.txt | sort | uniq | \
awk 'BEGIN{i=0}{print $0}{i++}END{print "Warnings: "i}' \
> ${{runner.workspace}}/build-docs/build-output-warnings.txt
cat ${{runner.workspace}}/build-docs/build-output-warnings.txt
exit $(tail -n 1 ${{runner.workspace}}/build-docs/build-output-warnings.txt | awk '{print $2}')
- name: Deploy
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: JamesIves/github-pages-deploy-action@releases/v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages
folder: ${{runner.workspace}}/build-docs/html
single-commit: true