mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-06-14 11:52:32 +03:00
Merge pull request #5448 from kamilkrzyskow/update-workflows
Fix GitHub Action caching methodology
This commit is contained in:
4
.github/workflows/documentation.yml
vendored
4
.github/workflows/documentation.yml
vendored
@@ -50,8 +50,10 @@ jobs:
|
|||||||
uses: actions/cache@v3
|
uses: actions/cache@v3
|
||||||
id: cache
|
id: cache
|
||||||
with:
|
with:
|
||||||
key: ${{ runner.os }}-${{ hashFiles('.cache/**') }}
|
key: mkdocs-material-${{ github.sha }}
|
||||||
path: .cache
|
path: .cache
|
||||||
|
restore-keys: |
|
||||||
|
mkdocs-material-
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: sudo apt-get install pngquant
|
run: sudo apt-get install pngquant
|
||||||
|
|||||||
@@ -38,10 +38,12 @@ contents:
|
|||||||
- uses: actions/setup-python@v4
|
- uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
python-version: 3.x
|
python-version: 3.x
|
||||||
- uses: actions/cache@v2
|
- 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
|
||||||
```
|
```
|
||||||
@@ -81,10 +83,12 @@ contents:
|
|||||||
- uses: actions/setup-python@v4
|
- uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
python-version: 3.x
|
python-version: 3.x
|
||||||
- uses: actions/cache@v2
|
- 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
|
||||||
|
|||||||
@@ -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:
|
||||||
@@ -495,14 +495,16 @@ carried out. You might want to:
|
|||||||
deploy:
|
deploy:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
- uses: actions/setup-python@v2
|
- uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
python-version: 3.x
|
python-version: 3.x
|
||||||
- uses: actions/cache@v2
|
- 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
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -232,7 +232,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:
|
||||||
@@ -243,14 +243,16 @@ whether the social cards need to be regenerated. You might want to:
|
|||||||
deploy:
|
deploy:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
- uses: actions/setup-python@v2
|
- uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
python-version: 3.x
|
python-version: 3.x
|
||||||
- uses: actions/cache@v2
|
- 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
|
||||||
```
|
```
|
||||||
|
|||||||
Reference in New Issue
Block a user