Update requirement for cpp import #170
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: GitHub pages | |
on: | |
# Trigger the workflow on push to main branch | |
push: | |
branches: | |
- master | |
# This job installs dependencies, build the book, and pushes it to `gh-pages` | |
jobs: | |
build-and-deploy-book: | |
strategy: | |
matrix: | |
include: | |
- os: ubuntu-latest | |
label: linux-64 | |
prefix: /usr/share/miniconda3/envs/vampy | |
# https://github.com/marketplace/actions/setup-miniconda#use-a-default-shell | |
defaults: | |
run: | |
shell: bash -l {0} | |
name: Build VaMPy documentation ${{ matrix.label }} | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Upgrade pip and setuptools | |
run: | | |
python3 -m pip install pip setuptools --upgrade | |
# See: https://github.com/marketplace/actions/setup-miniconda | |
- name: Setup Mambaforge | |
uses: conda-incubator/setup-miniconda@v2 | |
with: | |
miniforge-variant: Mambaforge | |
miniforge-version: latest | |
channels: conda-forge | |
activate-environment: vampy | |
use-mamba: true | |
- name: Set cache date | |
run: echo "DATE=$(date +'%Y%m%d')" >> $GITHUB_ENV | |
- uses: actions/cache@v2 | |
with: | |
path: ${{ matrix.prefix }} | |
key: ${{ matrix.label }}-conda-${{ hashFiles('environment.yml') }}-${{ env.DATE }}-${{ env.CACHE_NUMBER }} | |
id: cache | |
- name: Update environment | |
run: mamba env update -n vampy -f environment.yml | |
if: steps.cache.outputs.cache-hit != 'true' | |
# Install requirements, with downgraded docutils to fix layout-bug | |
# https://github.com/executablebooks/jupyter-book/issues/1997 | |
- name: Install dependencies | |
run: pip install -r requirements.txt | |
- name: Install VaMPy | |
run: python3 -m pip install '.[test]' | |
# Build the book | |
- name: Build the book | |
run: jupyter-book build docs | |
# Deploy the book's HTML to gh-pages branch | |
- name: GitHub Pages action | |
uses: peaceiris/actions-gh-pages@v3.6.1 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: docs/_build/html |