added conda details (#368) #154
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 release | |
on: | |
pull_request: | |
branches: | |
- main | |
push: | |
branches: | |
- main | |
tags: | |
- '*' | |
permissions: | |
contents: write | |
jobs: | |
test: | |
name: Documentation | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.12"] | |
steps: | |
- name: Install system packages | |
run: | | |
sudo apt-get update -y | |
sudo apt-get install -y libgl1 libglx-mesa0 libgl1-mesa-dev libglu1-mesa-dev freeglut3-dev libosmesa6 libosmesa6-dev libgles2-mesa-dev libarchive-dev libpangocairo-1.0-0 | |
- name: checkout actions | |
uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: install dependencies | |
run: python -m pip install .[docs] | |
- name: Sphinx build tagged version | |
if: startsWith(github.ref, 'refs/tags/') | |
run: | | |
sphinx-build docs _build/${{ github.ref_name }} | |
rm -rf _build/stable | |
mkdir -p _build/stable | |
sphinx-build -b linkcheck docs _build/stable | |
- name: Sphinx build dev version | |
if: (github.event_name == 'push' || github.event_name == 'pull_request') && !startsWith(github.ref, 'refs/tags/') | |
run: | | |
rm -rf _build/dev | |
mkdir -p _build/dev | |
sphinx-build -b linkcheck docs _build/dev | |
- name: Deploy docs to GitHub Pages | |
if: github.event_name == 'push' || startsWith(github.ref, 'refs/tags/') | |
uses: peaceiris/actions-gh-pages@v4 | |
with: | |
publish_branch: gh-pages | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: _build | |
# with next rlease of actions-gh-pages | |
# issue to allow force_orphan will be fixed | |
# https://github.com/peaceiris/actions-gh-pages/issues/455 | |
# force_orphan: true | |
keep_files: true |