Skip to content

Workflow file for this run

# Simple workflow for deploying static content to GitHub Pages
name: Deploy static content to Pages
on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
release:
types: [published]
env:
Python_Version: '3.10'
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
# Single deploy job since we're just deploying
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/setup-python@v4
name: Install Python
with:
python-version: ${{env.Python_Version}}
- name: Python Cache Key
shell: bash
run: |
echo $(which python) > /tmp/python_version.txt
- name: Get pip cache dir
shell: bash
id: pip-cache
run: |
echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT
- name: Pip-Tools
shell: bash
run: |
python -m pip install pip-tools
pip-compile setup.cfg
pip-compile build-requirements.in
pip-compile doc-requirements.in
- name: pip cache
uses: actions/cache@v3
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('python_version.txt') }}-${{ hashFiles('requirements.txt') }}-${{ hashFiles('build-requirements.txt') }}-${{ hashFiles('doc-requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-${{ hashFiles('python_version.txt') }}-${{ hashFiles('requirements.txt') }}-${{ hashFiles('build-requirements.txt') }}-${{ hashFiles('doc-requirements.txt') }}
${{ runner.os }}-pip-${{ hashFiles('python_version.txt') }}-${{ hashFiles('requirements.txt') }}-${{ hashFiles('build-requirements.txt') }}-
${{ runner.os }}-pip-${{ hashFiles('python_version.txt') }}-${{ hashFiles('requirements.txt') }}-
${{ runner.os }}-pip-${{ hashFiles('python_version.txt') }}-
- name: Update
run: |
pip install --upgrade pip wheel setuptools build cmake ninja
- name: Install Dependencies
shell: bash
run: |
set -eux
pip-sync requirements.txt build-requirements.txt doc-requirements.txt
- name: Install Dep
run: |
pip install typing-extensions
sudo apt-get install -y libeigen3-dev lcov graphviz mscgen dia pdf2svg astyle
sudo apt-get install -y doxygen doxygen-doxyparse fonts-liberation python3-breathe
- name: Prepare
shell: bash
run: mkdir build
- name: CMake Configure
shell: bash
run: >
cmake
-DBUILD_DOCS=ON
-G Ninja
-S .
-B build
- name: CMake Build
shell: bash
run: >
cmake
--build build
--parallel
--verbose
--target cxxcimod_header_only_docs
- name: pip install
shell: bash
run: python -m pip install -vvv .
- name: Jupyter Book
shell: bash
run: jupyter-book build docs --all
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
# Upload entire repository
path: 'docs/_build/html'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2