Skip to content

Continuous Integration, Documentation Build, and Dockerfile Fixes #1642

Continuous Integration, Documentation Build, and Dockerfile Fixes

Continuous Integration, Documentation Build, and Dockerfile Fixes #1642

Workflow file for this run

name: Build Documentation
on:
push:
branches:
- main
pull_request:
jobs:
build-documentation:
runs-on: ubuntu-latest
strategy:
max-parallel: 5
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v2
- name: Patch Environment File
run: sed -i 's/ - conda-forge::julia>=1.8.5,!=1.9.0/ - conda-forge::julia=1.9.1/' environment.yml
- name: Setup Mambaforge Python 3.7
uses: conda-incubator/setup-miniconda@v2
with:
environment-file: environment.yml
miniforge-variant: Mambaforge
miniforge-version: latest
python-version: 3.7
activate-environment: rmg_env
use-mamba: true
- name: Install sphinx
run: mamba install -y sphinx
- name: Mamba info
run: |
mamba info
mamba list
- name: Install and link Julia dependencies
run: |
julia -e "using Pkg; Pkg.add(PackageSpec(url=\"https://github.com/ReactionMechanismGenerator/ReactionMechanismSimulator.jl\", rev=\"main\"))"
julia -e "using Pkg; Pkg.add(\"PyCall\"); Pkg.add(\"DifferentialEquations\")"
python -c "import julia; julia.install()"
- name: Install and compile RMG
run: |
cd ..
git clone https://github.com/ReactionMechanismGenerator/RMG-database.git
cd RMG-Py
sed -i '/embedsignature/s/# //g' setup.py
make
- uses: actions/checkout@v2
with:
ref: gh-pages
path: build/html
- name: Make documentation - for testing
if: ${{ github.event_name != 'push' || github.repository != 'ReactionMechanismGenerator/RMG-Py' }}
run: |
cd documentation
sphinx-build -b html -d build/doctrees/ source/ build/html -w errors.log -W --keep-going
- name: Report documentation errors
if: ${{ failure() }}
run: |
cat documentation/errors.log
- name: Make documentation - to publish
if: ${{ github.event_name == 'push' && github.repository == 'ReactionMechanismGenerator/RMG-Py' }}
run: |
git config user.name "github-actions"
git config user.email "github-actions@github.com"
cd documentation
make html
- name: Check documentation links
continue-on-error: true
run: |
cd documentation
sphinx-build -b linkcheck -d build/doctrees/ source/ build/linkcheck | grep -e broken -e redirect | grep -v -e 'redirect https://doi.org/' -e 'broken https://doi.org/.* 403 Client Error: Forbidden'
- name: Publish documentation
if: ${{ github.event_name == 'push' && github.repository == 'ReactionMechanismGenerator/RMG-Py' }}
run: |
touch build/html/.nojekyll
cd build/html; git add -A .; git commit -m "Automated documentation rebuild"; git push origin gh-pages