Skip to content

Add content

Add content #80

Workflow file for this run

name: ci
on:
push:
branches:
- master
- main
permissions:
contents: write
env:
drawio_arch: amd64
drawio_version: 18.1.3
drawio_sha256sum: 39a50f25ad52d6909c5c18d89a7cfc193e8e31fb98458a390c0a0709d22e9e10
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Configure Git Credentials
env:
GH_TOKEN: ${{ secrets.MKDOCS_MATERIALS_INSIDER_PAT }}
run: |
git config user.name github-actions[bot]
git config user.email github-actions[bot]@users.noreply.github.com
git config --global url."https://${GH_TOKEN}@github.com/".insteadOf "[email protected]:"
- uses: actions/setup-python@v5
with:
python-version: 3.x
- name: Cache Poetry dependencies
uses: actions/cache@v4
with:
path: |
~/.cache/pypoetry
~/.venv
key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }}
restore-keys: |
${{ runner.os }}-poetry-
- name: Cache Draw.io download
uses: actions/cache@v4
with:
path: drawio-${{env.drawio_arch}}-${{env.drawio_version}}.deb
key: ${{ runner.os }}-drawio-${{env.drawio_arch}}-${{ env.drawio_version }}
- name: Install pandoc
run: |
sudo apt-get update
sudo apt-get install -y pandoc pngquant
- name: Setup Poetry
uses: abatilo/actions-poetry@v2
- name: Install Draw.io Desktop
run: |
set -euo pipefail
drawio_deb="drawio-${{env.drawio_arch}}-${{env.drawio_version}}.deb"
drawio_url="https://github.com/jgraph/drawio-desktop/releases/download/v${{env.drawio_version}}/${drawio_deb}"
if [ ! -f "$drawio_deb" ]; then
curl -L -o "$drawio_deb" "$drawio_url"
sha256sum --check <<<"${drawio_sha256sum} $drawio_deb"
fi
sudo apt-get install -y libasound2 xvfb ./"$drawio_deb"
- name: Cache Drawio Exporter
uses: actions/cache@v4
with:
path: /home/runner/work/handbook/handbook/docs/drawio-exporter/
key: ${{ runner.os }}-drawio-exporter-${{env.drawio_arch}}-${{ env.drawio_version }}
- name: Install Python dependencies
run: |
poetry install
- name: Build Documentation with MkDocs
env:
GH_TOKEN: ${{ secrets.MKDOCS_GIT_COMMITTERS_APIKEY }}
run: CI=true xvfb-run -a poetry run mkdocs gh-deploy --force