Skip to content

📒 Documentation › Build #17

📒 Documentation › Build

📒 Documentation › Build #17

Workflow file for this run

# ---------------------------------------------------------------------------------------
# @parent : github workflow
# @desc : build documentation
# @author : Aetherinox
# @url : https://github.com/Aetherinox
# ---------------------------------------------------------------------------------------
name: "📒 Documentation › Build"
run-name: "📒 Documentation › Build"
# ---------------------------------------------------------------------------------------
# environment variables
# ---------------------------------------------------------------------------------------
env:
ASSIGN_USER: Aetherinox
BOT_NAME_1: AdminServ
BOT_NAME_2: AdminServX
BOT_NAME_DEPENDABOT: dependabot[bot]
# ---------------------------------------------------------------------------------------
# triggers
# ---------------------------------------------------------------------------------------
on:
release:
types:
- published
workflow_dispatch:
schedule:
- cron: "0 */12 * * *"
# ---------------------------------------------------------------------------------------
# jobs
# ---------------------------------------------------------------------------------------
jobs:
build-docs:
runs-on: ubuntu-latest
permissions:
contents: write
pages: write
steps:
- name: "Checkout"
uses: actions/checkout@v4
- name: "Setup Python"
uses: actions/setup-python@v5
with:
python-version: 3.x
- name: "Build Documentation"
run: |
export DOCS_NAME=${{ secrets.DOCS_NAME }}
export DOCS_SECRET_L1=${{ secrets.DOCS_SECRET_L1 }}
export DOCS_SECRET_L2=${{ secrets.DOCS_SECRET_L2 }}
export GH_TOKEN=${{ secrets.ADMINSERV_TOKEN }}
pip install mkdocs
pip install mkdocs-material
pip install mike
pip install mkdocs-git-committers-plugin-2
pip install mkdocs-encryptcontent-plugin
pip install mkdocs-redirects mkdocs-glightbox pymdown-extensions mkdocs-git-revision-date-localized-plugin mkdocs-git-authors-plugin mkdocs-link-embeds-plugin
cd docs
mkdocs build
dir
env:
# Note: It is not the same as ${{ secrets.ADMINSERV_TOKEN }} !
GH_TOKEN: ${{ secrets.ADMINSERV_TOKEN }}
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
personal_token: ${{ secrets.ADMINSERV_TOKEN }}
publish_dir: ./docs/site