diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index e3a6ded5c..389299922 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -50,7 +50,7 @@ jobs: uses: actions/cache@v3 id: cache with: - key: mkdocs-material-${{ github.sha }} + key: mkdocs-material-${{ github.ref }} path: .cache restore-keys: | mkdocs-material- diff --git a/docs/publishing-your-site.md b/docs/publishing-your-site.md index 81d0ca560..860a4fe2e 100644 --- a/docs/publishing-your-site.md +++ b/docs/publishing-your-site.md @@ -40,11 +40,11 @@ contents: python-version: 3.x - uses: actions/cache@v3 with: - key: mkdocs-material-${{ github.sha }} + key: mkdocs-material-${{ github.ref }} # (3)! path: .cache restore-keys: | mkdocs-material- - - run: pip install mkdocs-material # (3)! + - run: pip install mkdocs-material # (4)! - run: mkdocs gh-deploy --force ``` @@ -53,7 +53,10 @@ contents: 2. At some point, GitHub renamed `master` to `main`. If your default branch is named `master`, you can safely remove `main`, vice versa. - 3. This is the place to install further [MkDocs plugins] or Markdown + 3. The `github.ref` property assures that the cache will + update on each pull request merge. + + 4. This is the place to install further [MkDocs plugins] or Markdown extensions with `pip` to be used during the build: ``` sh @@ -85,7 +88,7 @@ contents: python-version: 3.x - uses: actions/cache@v3 with: - key: mkdocs-material-${{ github.sha }} + key: mkdocs-material-${{ github.ref }} path: .cache restore-keys: | mkdocs-material- diff --git a/docs/setup/ensuring-data-privacy.md b/docs/setup/ensuring-data-privacy.md index 73fad6999..0d4e8896c 100644 --- a/docs/setup/ensuring-data-privacy.md +++ b/docs/setup/ensuring-data-privacy.md @@ -501,7 +501,7 @@ carried out. You might want to: python-version: 3.x - uses: actions/cache@v3 with: - key: mkdocs-material-${{ github.sha }} + key: mkdocs-material-${{ github.ref }} path: .cache restore-keys: | mkdocs-material- diff --git a/docs/setup/setting-up-social-cards.md b/docs/setup/setting-up-social-cards.md index 0ef032a7c..5246a56dd 100644 --- a/docs/setup/setting-up-social-cards.md +++ b/docs/setup/setting-up-social-cards.md @@ -249,7 +249,7 @@ whether the social cards need to be regenerated. You might want to: python-version: 3.x - uses: actions/cache@v3 with: - key: mkdocs-material-${{ github.sha }} + key: mkdocs-material-${{ github.ref }} path: .cache restore-keys: | mkdocs-material-