Skip to content

Publish docs online #39

Publish docs online

Publish docs online #39

# Publish docs to website on new release (or manual trigger)
name: "Publish docs online"
on:
release:
types: [created]
workflow_dispatch:
jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.x
uses: actions/setup-python@v2
with:
python-version: '3.8'
- name: Install sndfile library # for librose, see https://github.com/deepcharles/ruptures/pull/121
run: |
sudo apt-get install libsndfile1-dev
- name: Install ruptures and dependecies
run: |
python -m pip install --upgrade pip
python -m pip install .[docs]
- name: Run notebooks
run: |
find ./docs -name '*.ipynb' | xargs -P 3 -I % jupyter nbconvert --inplace --to notebook --ExecutePreprocessor.kernel_name=python --execute %
- name: Build documentation
run: |
mkdocs build
- name: Publish documentation to remote repo
uses: selenehyun/gh-push@master
env:
GITHUB_TOKEN: ${{ secrets.DOC_PUSHER_ACCESS_TOKEN }}
COMMIT_FILES: site/*
REPO_FULLNAME: centre-borelli/ruptures-docs
BRANCH: master