try get the job run #30
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 | |
defaults: | |
run: | |
shell: bash -l {0} | |
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 | |
environment-file: environment.yml | |
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 | |
# pip install myst-parser | |
# pip install matplotlib | |
# pip install sphinx-rtd-theme | |
# pip install sphinxcontrib-applehelp | |
# pip install sphinxcontrib-devhelp | |
# pip install sphinxcontrib-htmlhelp | |
# pip install sphinxcontrib-jquery | |
# pip install sphinxcontrib-jsmath | |
# pip install sphinxcontrib-qthelp | |
# pip install sphinxcontrib-serializinghtml | |
- name: Check Sphinx installation | |
run: sphinx-build --version | |
- name: Verify environment setup | |
run: | | |
which python | |
python --version | |
python -m pip list | grep amworkflow | |
- name: Test Import of amworkflow.geometry | |
run: | | |
python -c "import amworkflow.geometry.builtinCAD" | |
# - name: Build documentation | |
# run: | | |
# cd docs | |
# make clean | |
# make html | |
- name: Sphinx build | |
run: | | |
sphinx-build docs _build/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 |