diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index 4be118233..e3a6ded5c 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -50,8 +50,10 @@ jobs: uses: actions/cache@v3 id: cache with: - key: ${{ runner.os }}-${{ hashFiles('.cache/**') }} + key: mkdocs-material-${{ github.sha }} path: .cache + restore-keys: | + mkdocs-material- - name: Install dependencies run: sudo apt-get install pngquant diff --git a/docs/publishing-your-site.md b/docs/publishing-your-site.md index 8549c3bb8..81d0ca560 100644 --- a/docs/publishing-your-site.md +++ b/docs/publishing-your-site.md @@ -38,10 +38,12 @@ contents: - uses: actions/setup-python@v4 with: python-version: 3.x - - uses: actions/cache@v2 + - uses: actions/cache@v3 with: - key: ${{ github.ref }} + key: mkdocs-material-${{ github.sha }} path: .cache + restore-keys: | + mkdocs-material- - run: pip install mkdocs-material # (3)! - run: mkdocs gh-deploy --force ``` @@ -81,10 +83,12 @@ contents: - uses: actions/setup-python@v4 with: python-version: 3.x - - uses: actions/cache@v2 + - uses: actions/cache@v3 with: - key: ${{ github.ref }} + key: mkdocs-material-${{ github.sha }} path: .cache + restore-keys: | + mkdocs-material- - run: apt-get install pngquant # (1)! - run: pip install git+https://${GH_TOKEN}@github.com/squidfunk/mkdocs-material-insiders.git - run: mkdocs gh-deploy --force diff --git a/docs/setup/ensuring-data-privacy.md b/docs/setup/ensuring-data-privacy.md index 5f2417963..73fad6999 100644 --- a/docs/setup/ensuring-data-privacy.md +++ b/docs/setup/ensuring-data-privacy.md @@ -484,27 +484,29 @@ carried out. You might want to: `.cache` directory in between builds. Taking the example from the [publishing guide], add the following lines: - ``` yaml hl_lines="15-18" + ``` yaml hl_lines="15-20" name: ci on: push: branches: - master - main - jobs: - deploy: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 - with: - python-version: 3.x - - uses: actions/cache@v2 - with: - key: ${{ github.ref }} - path: .cache - - run: pip install mkdocs-material - - run: mkdocs gh-deploy --force + jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 + with: + python-version: 3.x + - uses: actions/cache@v3 + with: + key: mkdocs-material-${{ github.sha }} + path: .cache + restore-keys: | + mkdocs-material- + - run: pip install mkdocs-material + - run: mkdocs gh-deploy --force ``` [publishing guide]: ../publishing-your-site.md#with-github-actions diff --git a/docs/setup/setting-up-social-cards.md b/docs/setup/setting-up-social-cards.md index 94f113225..0ef032a7c 100644 --- a/docs/setup/setting-up-social-cards.md +++ b/docs/setup/setting-up-social-cards.md @@ -232,27 +232,29 @@ whether the social cards need to be regenerated. You might want to: `.cache` directory in between builds. Taking the example from the [publishing guide], add the following lines: - ``` yaml hl_lines="15-18" + ``` yaml hl_lines="15-20" name: ci on: push: branches: - master - main - jobs: - deploy: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 - with: - python-version: 3.x - - uses: actions/cache@v2 - with: - key: ${{ github.ref }} - path: .cache - - run: pip install mkdocs-material - - run: mkdocs gh-deploy --force + jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 + with: + python-version: 3.x + - uses: actions/cache@v3 + with: + key: mkdocs-material-${{ github.sha }} + path: .cache + restore-keys: | + mkdocs-material- + - run: pip install mkdocs-material + - run: mkdocs gh-deploy --force ``` [built-in social plugin]: #built-in-social-plugin