Build and Deploy Docs #21
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 Deploy Docs | |
on: | |
release: | |
types: | |
- published | |
workflow_dispatch: | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/[email protected] | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.8 | |
- name: Set up Node | |
uses: actions/setup-node@v2 | |
with: | |
node-version: "16" | |
- name: Generate pdoc output & Build Docusaurus website | |
run: | | |
pip install -e .[all] | |
pdoc -f --template-dir docs/pdoc/templates -o docs/docs classy | |
mv docs/docs/classy docs/docs/api | |
python docs/pdoc/pdoc_postprocess.py | |
cd docs | |
yarn install | |
# builds https://gitlab.grnet.gr/terminology/docusaurus-terminology | |
yarn docusaurus parse | |
yarn docusaurus glossary | |
# creates the build/ folder | |
yarn build | |
- name: Deploy to GitHub Pages | |
if: success() | |
uses: crazy-max/ghaction-github-pages@v2 | |
with: | |
target_branch: gh-pages | |
build_dir: docs/build | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |