forked from adf-python/adf-core-python
-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (55 loc) · 1.31 KB
/
document.yaml
File metadata and controls
64 lines (55 loc) · 1.31 KB
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
56
57
58
59
60
61
62
63
64
name: document
on:
workflow_dispatch:
push:
branches:
- main
- develop
paths:
- 'docs/**'
pull_request:
branches:
- main
- develop
paths:
- 'docs/**'
concurrency:
group: 'pages'
cancel-in-progress: true
permissions:
contents: write
pull-requests: write
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.12
- name: Cache virtual environment
id: cached-virtualenv
uses: actions/cache@v4
with:
path: .venv
key: ${{ runner.os }}-venv-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies
if: steps.cached-virtualenv.outputs.cache-hit != 'true'
run: |
python -m venv .venv
source .venv/bin/activate
pip install --upgrade pip
pip install poetry
poetry install
- name: Build documentation
run: |
source .venv/bin/activate
cd docs
python build.py
- name: Deploy documentation
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/pages