Skip to content

docs: fixed title in non-LTH mode #283

docs: fixed title in non-LTH mode

docs: fixed title in non-LTH mode #283

Workflow file for this run

name: Pages
on:
#schedule:
# # * is a special character in YAML so you have to quote this string
# - cron: '30 0 * * *'
push:
# Build on all branches (except gh-pages)
# Deploy will only happen on master
branches:
- '**' # matches all branches
- '!gh-pages' # excludes gh-pages
pull_request:
branches: [ master ]
jobs:
tex:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v2 # If you're using actions/checkout@v2 you must set persist-credentials to false in most cases for the deployment to work correctly.
with:
persist-credentials: false
- name: Compile LaTeX documents
uses: xu-cheng/texlive-action/full@v1
with:
run: |
apk add make py3-pygments
make tex
- name: Upload docs
uses: actions/upload-artifact@v2
with:
name: tex
path: dist
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: 3.8
# Set up poetry cache, from https://github.com/python-poetry/poetry/blob/45a9b8f20384591d0a33ae876bcf23656f928ec0/.github/workflows/main.yml
- name: Get full python version
id: full-python-version
run: |
echo ::set-output name=version::$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info[:3]))")
- name: Set up poetry
run: |
python -m pip install --upgrade pip poetry
poetry config virtualenvs.in-project true
- name: Set up cache
uses: actions/cache@v2
id: cache
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('**/poetry.lock') }}
- name: Ensure cache is healthy
if: steps.cache.outputs.cache-hit == 'true'
run: timeout 10s poetry run pip --version || rm -rf .venv
- name: Install APT dependencies
run: |
sudo apt-get install -y git build-essential bluez apt-utils wget libfreetype6 libpng-dev libopenblas-dev gcc gfortran libsnappy-dev texlive-base
- name: Install dependencies
run: |
poetry install
- name: Build docs
shell: bash
run: |
pushd notebooks; make set-kernel; popd
make docs
- name: Upload
uses: actions/upload-artifact@v2
with:
name: docs
path: docs/sphinx/build/html
notebooks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: 3.8
# Set up poetry cache, from https://github.com/python-poetry/poetry/blob/45a9b8f20384591d0a33ae876bcf23656f928ec0/.github/workflows/main.yml
- name: Get full python version
id: full-python-version
run: |
echo ::set-output name=version::$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info[:3]))")
- name: Set up poetry
run: |
python -m pip install --upgrade pip poetry
poetry config virtualenvs.in-project true
- name: Set up cache
uses: actions/cache@v2
id: cache
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('**/poetry.lock') }}
- name: Ensure cache is healthy
if: steps.cache.outputs.cache-hit == 'true'
run: timeout 10s poetry run pip --version || rm -rf .venv
- name: Install APT dependencies
run: |
sudo apt-get install -y git build-essential bluez apt-utils wget libfreetype6 libpng-dev libopenblas-dev gcc gfortran libsnappy-dev
sudo apt-get install -y texlive-base # for rendering LaTeX fonts
- name: Install dependencies
run: |
poetry install
- name: Build notebooks
run: |
poetry run pip install 'nbconvert>=6.0'
env PYTEST_CURRENT_TEST=true make notebooks
- name: Upload notebooks
uses: actions/upload-artifact@v2
with:
name: notebooks
path: notebooks/output
deploy:
runs-on: ubuntu-latest
needs: [tex, docs, notebooks]
steps:
- uses: actions/download-artifact@v2
with:
name: tex
path: dist
- uses: actions/download-artifact@v2
with:
name: docs
path: dist
- uses: actions/download-artifact@v2
with:
name: notebooks
path: dist
- name: Display structure of downloaded files
run: ls -R
- name: Add .nojekyll
run: touch dist/.nojekyll
# Might not work due to GitHub being weird about not triggering site rebuilds from workflows.
# See this for more info: https://github.community/t5/GitHub-Actions/Github-action-not-triggering-gh-pages-upon-push/td-p/26869/highlight/true/page/3
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@releases/v3
if: github.ref == 'refs/heads/master'
with:
BRANCH: gh-pages # The branch the action should deploy to.
FOLDER: dist # The folder the action should deploy.
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }} # not defined