Files
AI-on-the-edge-device-docs/.github/workflows/build-docs.yaml
2023-02-10 22:04:12 +01:00

51 lines
1.7 KiB
YAML

###########################################################################################
# Build the documentation using mkdocs
# This will update the gh-pages branch which in return triggers the pages-build-deployment
# Action (provided by Github, not editable)
# That action will publish it to https://jomjol.github.io/AI-on-the-edge-device-docs
###########################################################################################
name: Build Documentation
on:
push:
branches:
- 'main'
jobs:
build-documentation:
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Cache PIP
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-python@v4
- run: |
pip install --upgrade pip && pip install mkdocs mkdocs-gen-files mkdocs-awesome-pages-plugin mkdocs-material
git config user.name 'github-actions[bot]'
git config user.email 'github-actions[bot]@users.noreply.github.com'
- name: Store docs in gh-pages branch
run: |
# Update Parameter Documentation
cd param-docs
rm -rf parameter-pages/*
python generate-param-doc-pages.py
tree parameter-pages
python concat-parameter-pages.py
cd ..
# Deploy it
mkdocs gh-deploy