-
Notifications
You must be signed in to change notification settings - Fork 91
55 lines (51 loc) · 1.49 KB
/
docs.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
name: Documentation
on:
push:
branches:
- main
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
# Building and deploying docs is broken on forked repos
if: github.repository == 'terrapower/armi'
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Update package index
run: sudo apt-get update
- name: Install mpi libs
run: sudo apt-get -y install libopenmpi-dev
- name: Install Pandoc
run: sudo apt-get -y install pandoc
- name: Setup Graphviz
uses: ts-graphviz/setup-graphviz@v2.0.2
- name: Make HTML Docs
run: |
pip install -e .[memprof,mpi,test,docs]
cd doc
git submodule init
git submodule update
make html
- name: deploy
if: github.ref == 'refs/heads/main'
uses: JamesIves/github-pages-deploy-action@v4.6.1
with:
token: ${{ secrets.ACCESS_TOKEN }}
repository-name: ${{ github.repository_owner }}/terrapower.github.io
branch: main
folder: doc/_build/html
target-folder: armi
- name: Archive Docs from PR
if: github.ref != 'refs/heads/main'
uses: actions/upload-artifact@v4
with:
name: pr-docs
path: doc/_build/html
retention-days: 5