try get the job run #12
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 Docs | |
on: [push, pull_request, workflow_dispatch] | |
permissions: | |
contents: write | |
env: | |
CACHE_NUMBER: 1 # increase to reset cache manually | |
jobs: | |
BuildDocs: | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout repo content | |
uses: actions/checkout@v2 | |
- name: Setup Mambaforge | |
uses: conda-incubator/setup-miniconda@v2 | |
with: | |
miniforge-variant: Mambaforge | |
miniforge-version: latest | |
activate-environment: amworkflow | |
use-mamba: true | |
- name: Set cache date | |
run: echo "DATE=$(date +'%Y%m%d')" >> $GITHUB_ENV | |
- uses: actions/cache@v2 | |
with: | |
path: "/usr/share/miniconda3/envs/amworkflow" | |
key: conda-${{ hashFiles('environment.yml') }}-${{ env.DATE }}-${{ env.CACHE_NUMBER }} | |
id: cache | |
- name: Update environment | |
run: mamba env update -n amworkflow -f environment.yml | |
if: steps.cache.outputs.cache-hit != 'true' | |
- name: Install package | |
run: git clone https://github.com/tpaviot/pythonocc-utils.git && pip install ./pythonocc-utils | |
- name: Install amworkflow | |
run: python -m pip install . | |
- name: Install Sphinx with pip | |
run: pip install sphinx | |
- name: Check Sphinx installation | |
run: sphinx-build --version | |
- name: Build documentation | |
run: | | |
cd docs | |
make html | |
- name: Deploy to GitHub Pages | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
publish_branch: gh-pages | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./docs/_build/html | |
force_orphan: true |