Merge pull request #62 from xiaoruiDong/docs #1
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: Build Documentation | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build-documentation: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash -l {0} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Mambaforge Python 3.8 | |
uses: conda-incubator/setup-miniconda@v2 | |
with: | |
environment-file: environment.yml | |
miniforge-variant: Mambaforge | |
miniforge-version: latest | |
python-version: 3.8 | |
activate-environment: rdmc_env | |
use-mamba: true | |
- name: Install RDMC | |
run: python -m pip install --no-deps -vv ./ | |
- name: Install sphinx | |
run: mamba install -y sphinx=7.2.4 pydata-sphinx-theme | |
# 09/11/2023: sphinx 7.2.5 has an issue with numpy https://github.com/sphinx-doc/sphinx/issues/11662 | |
- name: Mamba info | |
run: | | |
mamba info | |
mamba list | |
- uses: actions/checkout@v3 | |
with: | |
ref: github_pages | |
- name: Update the github_pages to main | |
run: | | |
git fetch origin main | |
git reset --hard origin/main | |
- name: Make documentation | |
run: | | |
cd docs | |
make -C ./ clean html | |
make html | |
- name: Deploy documentation | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./docs/build/html |