From ded0da50a0322854da07968e9431715534506046 Mon Sep 17 00:00:00 2001 From: ddebowczyk Date: Thu, 29 Feb 2024 20:32:05 +0100 Subject: [PATCH] mkdocs.yml --- .github/workflows/mkdocs.yml | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/.github/workflows/mkdocs.yml b/.github/workflows/mkdocs.yml index dbff0e73..038c73db 100644 --- a/.github/workflows/mkdocs.yml +++ b/.github/workflows/mkdocs.yml @@ -4,18 +4,28 @@ on: branches: - main +permissions: + contents: write jobs: - build: - name: Deploy docs + deploy: runs-on: ubuntu-latest - container: - image: squidfunk/mkdocs-material steps: - - name: Checkout main - uses: actions/checkout@v2 - - name: Deploy docs - uses: mhausenblas/mkdocs-deploy-gh-pages@1.26 + - 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: 3.x + - 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- + - run: pip install mkdocs-material + - run: mkdocs gh-deploy --force env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - CONFIG_FILE: mkdocs.yml - REQUIREMENTS: requirements-doc.txt