From 0d748fedafbe947c52e392bc99f556def2ef699a Mon Sep 17 00:00:00 2001 From: Chris Howland Date: Wed, 20 Sep 2023 09:30:39 +0200 Subject: [PATCH] update docs deployment - only for main pushes --- .github/workflows/docs.yml | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 7cc049d4..b88550f4 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -5,19 +5,28 @@ name: Deploy documentation on: push: - branches: [ main ] - pull_request: - branches: [ main ] + branches: + - main + +permissions: + contents: write jobs: deploy: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - - uses: actions/setup-python@v2 + - uses: actions/checkout@v4 + - uses: actions/setup-python@v4 with: python-version: 3.x + + - run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV + - uses: actions/cache@v3 + with: + key: mkdocs-material-${{ env.cache_id }} + path: .cache + restore-keys: | + mkdocs-material- - run: pip install mkdocs-material mkdocs-macros-plugin