forked from project-chip/connectedhomeip
-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (50 loc) · 1.45 KB
/
docbuild.yaml
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
name: Documentation Build
on:
pull_request:
types: [opened, synchronize, reopened]
branches:
- master
paths:
- '.github/workflows/docbuild.yaml'
- '**.md'
- 'docs/**'
push:
branches:
- master
permissions:
contents: write
jobs:
build-and-publish:
runs-on: ubuntu-latest
steps:
- name: Checkout the code
uses: actions/checkout@v3
with:
path: matter
fetch-depth: 0
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: 3.8
cache-dependency-path: matter/docs/requirements.txt
cache: pip
- name: Install base dependencies
working-directory: matter
run: |
sudo pip3 install -U pip
pip3 install -r docs/requirements.txt
- name: Build documentation
working-directory: matter/docs
run: |
mkdir -p _build/src
make html
touch _build/html/.nojekyll
- name: Deploy to gh-pages
if: github.repository == 'project-chip/connectedhomeip' && github.event_name == 'push' && github.ref_name == 'master'
uses: peaceiris/actions-gh-pages@v3
with:
deploy_key: ${{ secrets.DOXYGEN_DEPLOY_KEY }}
external_repository: project-chip/connectedhomeip-doc
publish_dir: matter/docs/_build/html
# Keep only the latest version of the documentation
force_orphan: true