Skip to content

Build and Publish Docs #19

Build and Publish Docs

Build and Publish Docs #19

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