Build and Publish Docs #19
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: Build and Publish Docs | |
on: | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.x | |
- name: Install Materials Compendium | |
run: | | |
python -m pip install . | |
- name: Install dependencies | |
run: | | |
pip install sphinx \ | |
cloud_sptheme \ | |
nbsphinx \ | |
myst-nb \ | |
sphinx_design \ | |
sphinx_autodoc_typehints | |
- name: Build Sphinx documentation | |
run: | | |
cd docs | |
make html | |
- name: Publish documentation to gh-pages | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
branch: gh-pages | |
folder: docs/build/html | |
commit-message: | | |
timestamp=$(date +"%Y-%m-%d %H:%M:%S") | |
Publish docs at $timestamp |