Updated GitHub Actions cache examples

This commit is contained in:
Kamil Krzyśków 2023-04-30 23:14:04 +02:00
parent 6ed0203828
commit c22d705826
3 changed files with 14 additions and 6 deletions

View File

@ -40,8 +40,10 @@ contents:
python-version: 3.x python-version: 3.x
- uses: actions/cache@v3 - uses: actions/cache@v3
with: with:
key: ${{ github.ref }} key: mkdocs-material-${{ github.sha }}
path: .cache path: .cache
restore-keys: |
mkdocs-material-
- run: pip install mkdocs-material # (3)! - run: pip install mkdocs-material # (3)!
- run: mkdocs gh-deploy --force - run: mkdocs gh-deploy --force
``` ```
@ -83,8 +85,10 @@ contents:
python-version: 3.x python-version: 3.x
- uses: actions/cache@v3 - uses: actions/cache@v3
with: with:
key: ${{ github.ref }} key: mkdocs-material-${{ github.sha }}
path: .cache path: .cache
restore-keys: |
mkdocs-material-
- run: apt-get install pngquant # (1)! - run: apt-get install pngquant # (1)!
- run: pip install git+https://${GH_TOKEN}@github.com/squidfunk/mkdocs-material-insiders.git - run: pip install git+https://${GH_TOKEN}@github.com/squidfunk/mkdocs-material-insiders.git
- run: mkdocs gh-deploy --force - run: mkdocs gh-deploy --force

View File

@ -484,7 +484,7 @@ carried out. You might want to:
`.cache` directory in between builds. Taking the example from the `.cache` directory in between builds. Taking the example from the
[publishing guide], add the following lines: [publishing guide], add the following lines:
``` yaml hl_lines="15-18" ``` yaml hl_lines="15-20"
name: ci name: ci
on: on:
push: push:
@ -501,8 +501,10 @@ carried out. You might want to:
python-version: 3.x python-version: 3.x
- uses: actions/cache@v3 - uses: actions/cache@v3
with: with:
key: ${{ github.ref }} key: mkdocs-material-${{ github.sha }}
path: .cache path: .cache
restore-keys: |
mkdocs-material-
- run: pip install mkdocs-material - run: pip install mkdocs-material
- run: mkdocs gh-deploy --force - run: mkdocs gh-deploy --force
``` ```

View File

@ -233,7 +233,7 @@ whether the social cards need to be regenerated. You might want to:
`.cache` directory in between builds. Taking the example from the `.cache` directory in between builds. Taking the example from the
[publishing guide], add the following lines: [publishing guide], add the following lines:
``` yaml hl_lines="15-18" ``` yaml hl_lines="15-20"
name: ci name: ci
on: on:
push: push:
@ -250,8 +250,10 @@ whether the social cards need to be regenerated. You might want to:
python-version: 3.x python-version: 3.x
- uses: actions/cache@v3 - uses: actions/cache@v3
with: with:
key: ${{ github.ref }} key: mkdocs-material-${{ github.sha }}
path: .cache path: .cache
restore-keys: |
mkdocs-material-
- run: pip install mkdocs-material - run: pip install mkdocs-material
- run: mkdocs gh-deploy --force - run: mkdocs gh-deploy --force
``` ```