Skip to content

doc: update documentation. #4

doc: update documentation.

doc: update documentation. #4

Workflow file for this run

# Copyright (c) 2016-2024 Makerdiary <https://makerdiary.com>
#
# SPDX-License-Identifier: Apache-2.0
name: documentation
on:
push:
branches:
- main
env:
PYTHON_VERSION: 3.x
permissions:
contents: write
jobs:
documentation:
name: Build documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Configure Git Credentials
run: |
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
- uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Set the date environmental variable
run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
- uses: actions/cache@v4
with:
key: mkdocs-material-${{ env.cache_id }}
path: .cache
restore-keys: |
mkdocs-material-
- name: Install Python dependencies
run: |
python3 -m pip install --upgrade pip
python3 -m pip install wheel
python3 -m pip install -r requirements-docs.txt
- name: Build site
run: mkdocs build
- name: Deploy documentation
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GOOGLE_ANALYTICS_KEY: ${{ vars.GOOGLE_ANALYTICS_KEY }}
run: |
mkdocs gh-deploy --force
mkdocs --version