forked from BerkeleyLab/assert
-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (41 loc) · 1.37 KB
/
deploy-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
name: Build and Deploy Documentation
on: [push, pull_request]
jobs:
Build:
runs-on: ubuntu-22.04
env:
FC: gfortran
GCC_V: 12
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Dependencies Ubuntu
run: |
sudo apt-get update
sudo apt install -y gfortran-${GCC_V} python3-dev python3 build-essential numdiff graphviz
sudo pip install ford markdown==3.3.4
- name: Build Developer Documentation
run: |
ford -I include doc-generator.md > ford_output.txt
# Turn warnings into errors
cat ford_output.txt; if grep -q -i Warning ford_output.txt; then exit 1; fi
cp ./README.md ./doc/html
- name: Upload Documentation
uses: actions/upload-artifact@v4
with:
name: documentation
path: doc/html
if-no-files-found: error
- name: Broken Link Check
if: ${{ github.ref == 'refs/heads/main'}}
uses: technote-space/[email protected]
with:
TARGET: file://${{ github.workspace }}/doc/html/index.html
RECURSIVE: true
ASSIGNEES: ${{ github.actor }}
- name: Deploy API Documentation
uses: JamesIves/[email protected]
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
with:
branch: gh-pages
folder: doc/html