Skip to content

Merge pull request #124 from IGNF/more-metrics #206

Merge pull request #124 from IGNF/more-metrics

Merge pull request #124 from IGNF/more-metrics #206

Workflow file for this run

# Workflow name
name: "Documentation Build"
on:
push:
branches:
- main
# UNCOMMENT TO DEBUG DOCUMENTATION
# pull_request:
# branches:
# - main
jobs:
build-and-deploy:
runs-on: ubuntu-latest
# Use bash instead of sh for conda activation
defaults:
run:
shell: bash -l {0}
# Task to do when launching the workflow
steps:
# 1. First get the repository source
- name: "Checkout"
uses: actions/checkout@v3
# 2. Setup virtual environment with mamba
# See https://github.com/conda-incubator/setup-miniconda#caching-environments
- name: Setup a conda-incubator with an empty conda env
uses: conda-incubator/setup-miniconda@v2
with:
python-version: 3.9.12
miniforge-variant: Mambaforge
miniforge-version: latest
use-mamba: true
# Environment to create and activate for next steps
activate-environment: myria3d
- name: Cache conda environment based on dependencies.
uses: actions/cache@v3
with:
path: ${{ env.CONDA }}/envs
key: conda-${{ hashFiles('environment.yml') }}
id: cache
- name: Update the (currently empty) myria3d environment, if a cache cannot be found.
if: steps.cache.outputs.cache-hit != 'true'
run: mamba env update -n myria3d -f environment.yml
- name: "Build documentation"
working-directory: ./docs/
run: |
# Tell torch_geometric where to find cuda
export LD_LIBRARY_PATH="/usr/share/miniconda3/envs/myria3d/lib:$LD_LIBRARY_PATH"
make html
# 3. Déploy on Github Pages
- name: "Deploy documentation on Github pages"
uses: JamesIves/github-pages-deploy-action@v4
with:
BRANCH: gh-pages # <- Branch where generated doc files will be commited
# BRANCH: gh-pages-DEBUG # <-- UNCOMMENT TO DEBUG DOCUMENTATION
FOLDER: docs/build/html/ # <- Dir where .nojekyll is created and from which to deploy github pages.