docs: Enhance Python workflow example (#261)

4e1362e350

ccf9619480
https://github.com/actions/cache/pull/285
This commit is contained in:
Shohei Ueda 2020-04-30 17:03:08 +09:00 committed by GitHub
parent 91e6658ef0
commit e4462d9bb6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 4 deletions

View File

@ -787,18 +787,23 @@ jobs:
python-version: '3.6'
architecture: 'x64'
- name: Upgrade pip
run: python3 -m pip install --upgrade pip
- name: Get pip cache dir
id: pip-cache
run: echo "::set-output name=dir::$(pip cache dir)"
- name: Cache dependencies
uses: actions/cache@v1
with:
path: ~/.cache/pip
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
python3 -m pip install --upgrade pip
python3 -m pip install -r ./requirements.txt
run: python3 -m pip install -r ./requirements.txt
- run: mkdocs build