From a06e4e5172835828bad8f7abc4def94758169e44 Mon Sep 17 00:00:00 2001 From: David Okpare Date: Sat, 22 Jul 2023 09:32:01 +0100 Subject: [PATCH] Update mkdocs ci (#67) --- .github/workflows/mkdocs.yml | 28 ++++++++++++++++++++++++---- requirements-doc.txt | 5 +++-- 2 files changed, 27 insertions(+), 6 deletions(-) diff --git a/.github/workflows/mkdocs.yml b/.github/workflows/mkdocs.yml index 2efe760..b35d2a3 100644 --- a/.github/workflows/mkdocs.yml +++ b/.github/workflows/mkdocs.yml @@ -8,6 +8,9 @@ on: branches: - main +permissions: + contents: write + jobs: deploy: runs-on: ubuntu-latest @@ -16,7 +19,24 @@ jobs: - name: Checkout code uses: actions/checkout@v2 - - name: Deploy MkDocs - uses: mhausenblas/mkdocs-deploy-gh-pages@1.26 - env: - requirements: requirements-doc.txt + - name: Setup Python + uses: actions/setup-python@v4 + with: + python-version: 3.x + + - name: Store cache_id + run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV + + - name: Setup cache + uses: actions/cache@v3 + with: + key: mkdocs-material-${{ env.cache_id }} + path: .cache + restore-keys: | + mkdocs-material- + + - name: Install Requirements + run: pip install -r requirements-doc.txt + + - name: Build and deploy MkDocs + run: mkdocs gh-deploy --force diff --git a/requirements-doc.txt b/requirements-doc.txt index 1196410..a1c4d2e 100644 --- a/requirements-doc.txt +++ b/requirements-doc.txt @@ -1,7 +1,8 @@ -mkdocs-material +mkdocs-material +pillow +cairosvg mkdocstrings mkdocstrings-python -termynal openai pydantic pytest \ No newline at end of file