-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (50 loc) · 1.41 KB
/
pages-build.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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: pages-build
on:
push:
branches: [ main ]
paths:
- .github/workflows/pages-build.yml
- pyproject.toml
- mkdocs.yml
- docs/**
permissions:
contents: write
jobs:
build:
timeout-minutes: 5
name: build image
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Configure Git Credentials
run: |
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: 3.11
- name: cache poetry install
uses: actions/cache@v4
with:
path: ~/.local
key: poetry-latest-python-3.11-1.7.1
- name: Install Poetry
uses: snok/install-poetry@v1
with:
version: 1.7.1
virtualenvs-create: true
virtualenvs-in-project: true
- name: cache root dependencies
id: cache-deps
uses: actions/cache@v4
with:
path: .venv
key: root_dependencies-${{ hashFiles('./poetry.lock')}}-3.11-1.7.1
- name: Install root dependencies
run: poetry install --no-interaction --no-root --all-extras
- name: Deploy Documentation
run: poetry run mkdocs gh-deploy --force
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}