-
Notifications
You must be signed in to change notification settings - Fork 1
32 lines (32 loc) · 965 Bytes
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
name: ci
on:
push:
branches:
- main
permissions:
contents: write
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Shallow clone
- uses: actions/setup-python@v4
with:
python-version: 3.x
# Weekly cache
# - run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
- uses: actions/cache@v3
id: cache-venv
with:
# key: mkdocs-material-${{ env.cache_id }}
key: ${{ runner.os }}-venv-${{ hashFiles('**/requirements*.txt') }}
# Was: .cache
path: ./.venv/
restore-keys: |
${{ runner.os }}-venv-
- run: python -m venv ./.venv && . ./.venv/bin/activate &&
pip install -r ./requirements.txt
if: steps.cache-venv.outputs.cache-hit != 'true'
- run: . ./.venv/bin/activate && mkdocs gh-deploy --force