From 6ddc79219a36f78610b64456fd22310e2d4a8af8 Mon Sep 17 00:00:00 2001 From: Martin Fenner Date: Wed, 8 Jan 2025 13:11:45 +0100 Subject: [PATCH] Update static.yml --- .github/workflows/static.yml | 43 ++++++++++++++++-------------------- 1 file changed, 19 insertions(+), 24 deletions(-) diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml index 249fe98..73dc1e7 100644 --- a/.github/workflows/static.yml +++ b/.github/workflows/static.yml @@ -1,33 +1,28 @@ on: workflow_dispatch: push: - branches: ["main"] - -name: Publish Documentation + branches: + - main permissions: - contents: read - pages: write - id-token: write - -concurrency: - group: "pages" - cancel-in-progress: false - + contents: write jobs: deploy: - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} runs-on: ubuntu-latest steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Setup Pages - uses: actions/configure-pages@v5 - - name: Upload artifact - uses: actions/upload-pages-artifact@v3 + - 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: - path: '_site' - - name: Deploy to GitHub Pages - id: deployment - uses: actions/deploy-pages@v4 + 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