-
Notifications
You must be signed in to change notification settings - Fork 1
41 lines (39 loc) · 994 Bytes
/
docs.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
on:
push:
branches:
- main
pull_request:
types:
- opened
- reopened
- synchronize
- closed
jobs:
publish_pages:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/cache@v3
with:
path: .venv
key: ${{ runner.os }}-poetry-${{ hashFiles('poetry.lock') }}
restore-keys: |
${{ runner.os }}-poetry-
- name: Install Dependencies
run: |
pip install poetry
poetry config virtualenvs.in-project true
poetry install
- name: Build documentation
run: |
poetry run mkdocs build
- name: Publish preview
if: ${{ github.event_name == 'pull_request' }}
uses: rossjrw/pr-preview-action@v1
with:
source-dir: site
- name: Publish Pages
if: ${{ github.event_name == 'push' }}
run: poetry run mkdocs gh-deploy