Adding an SCR section to the docs #1425
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.13 | |
- 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/[email protected] | |
- name: Make html/pdf Docs | |
continue-on-error: true | |
run: | | |
sudo apt-get install texlive-xetex | |
sudo apt-get install texlive-latex-base | |
sudo apt-get install texlive-fonts-recommended | |
sudo apt-get install texlive-latex-extra | |
sudo apt-get install texlive-full | |
pip install -e .[memprof,mpi,test,docs] | |
python -c "from armi.bookkeeping.report.reportingUtils import getSystemInfo;print(getSystemInfo())" > system_info.log | |
date > python_details.log | |
python --version >> python_details.log | |
pip freeze >> python_details.log | |
pytest --junit-xml=test_results.xml -v -n 4 armi > pytest_verbose.log | |
cd doc | |
git submodule init | |
git submodule update | |
echo "make html:" | |
make html | |
echo "make latex:" | |
make latex | |
cd _build/latex/ | |
echo "latexmk -pdf -f -interaction=nonstopmode ARMI.tex:" | |
latexmk -pdf -f -interaction=nonstopmode ARMI.tex | |
- name: Deploy | |
if: github.ref == 'refs/heads/main' | |
uses: JamesIves/[email protected] | |
with: | |
token: ${{ secrets.ACCESS_TOKEN }} | |
repository-name: ${{ github.repository_owner }}/terrapower.github.io | |
branch: main | |
folder: doc/_build/html | |
target-folder: armi | |
- name: Archive HTML Docs | |
if: github.ref != 'refs/heads/main' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: html-docs | |
path: doc/_build/html | |
retention-days: 5 | |
- name: Archive PDF Docs | |
uses: actions/upload-artifact@v4 | |
with: | |
name: pdf-docs | |
path: doc/_build/latex/ARMI.pdf | |
retention-days: 5 |