forked from empicano/aiomqtt
-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (47 loc) · 1.31 KB
/
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
42
43
44
45
46
47
48
49
name: docs
on:
push:
branches: [main]
paths:
- "docs/**"
- README.md
- .github/workflows/docs.yml
pull_request:
paths:
- "docs/**"
- README.md
- .github/workflows/docs.yml
jobs:
docs:
runs-on: ubuntu-latest
defaults:
run:
shell: bash
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Python
id: setup-python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Load cached dependencies
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: docs-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/pyproject.toml') }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .[docs]
- name: Build documentation
run: scripts/docs --no-reload
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
if: github.ref == 'refs/heads/main'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/_build
publish_branch: documentation
user_name: "github-actions[bot]"
user_email: "github-actions[bot]@users.noreply.github.com"