diff --git a/.github/workflows/mkdocs-deploy.yml b/.github/workflows/mkdocs-deploy.yml index 37ecf75..6c768f2 100644 --- a/.github/workflows/mkdocs-deploy.yml +++ b/.github/workflows/mkdocs-deploy.yml @@ -11,18 +11,25 @@ permissions: jobs: deploy: runs-on: ubuntu-latest + env: + PIPENV_VENV_IN_PROJECT: '1' steps: - uses: actions/checkout@v3 - uses: actions/setup-python@v4 with: python-version: 3.x - - uses: actions/cache@v2 + - name: Cache pipenv virtual environment + uses: actions/cache@v3 with: - path: .cache - key: ${{ runner.os }}-pip-${{ hashFiles('mkdocs-requirements.txt') }} + path: .venv + key: ${{ runner.os }}-pipenv-${{ hashFiles('Pipfile.lock') }} restore-keys: | - ${{ runner.os }}-pip- - - run: pip install -r mkdocs-requirements.txt - - run: mkdocs build --strict - - run: mkdocs gh-deploy --force - + ${{ runner.os }}-pipenv- + - name: Install pipenv + run: python -m pip install --upgrade pip pipenv + - name: Install dependencies with pipenv + run: pipenv install --deploy --ignore-pipfile + - name: Build the site with mkdocs + run: pipenv run mkdocs build --strict + - name: Deploy to GitHub Pages + run: pipenv run mkdocs gh-deploy --force