Skip to content

Merge pull request #128 from KVSlab/revert-network-bc #150

Merge pull request #128 from KVSlab/revert-network-bc

Merge pull request #128 from KVSlab/revert-network-bc #150

Workflow file for this run

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'
- name: Install dependencies
run: |
pip install -r requirements.txt
- name: Install VaMPy
run: python3 -m pip install .[test]
# https://github.com/executablebooks/jupyter-book/issues/1997
- name: Downgrade docutils to fix layout-bug
run: python3 -m pip install docutils==0.17.1
# 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/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/_build/html