diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d1f8e427..4c254c8a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,12 +25,27 @@ jobs: runs-on: ubuntu-18.04 steps: - uses: actions/checkout@v2 + - name: Setup Python - uses: actions/setup-python@v1 + uses: actions/setup-python@v2 with: python-version: '3.8' - architecture: 'x64' - - run: python3 -m pip install --upgrade pip + + - 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: ${{ steps.pip-cache.outputs.dir }} + key: ${{ runner.os }}-pipenv-${{ hashFiles('**/Pipfile.lock') }} + restore-keys: | + ${{ runner.os }}-pipenv- + - run: python3 -m pip install pipenv - run: pipenv sync --dev - run: pipenv run mkdocs build --config-file ./mkdocs-sample.yml diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index c12e0d51..91fb8707 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -12,13 +12,13 @@ jobs: - uses: actions/checkout@v2 - name: Setup Python - uses: actions/setup-python@v1 + uses: actions/setup-python@v2 with: python-version: '3.8' - architecture: 'x64' - name: Upgrade pip run: | + python3 -m pip -V python3 -m pip install --upgrade pip python3 -V python3 -m pip -V