1- name : " Build doc from develop/plugins"
2- # on: [workflow_dispatch, push]
1+ name : " Build doc from develop (plugins)"
32on :
43 workflow_dispatch :
54 push :
87
98jobs :
109 build :
10+ # Only run on the upstream repository — forks have no dev_doc companion repo
11+ # and lack the PAT_TOKEN secret required for the deploy step.
12+ if : github.repository == 'smarthomeNG/plugins'
1113 runs-on : ubuntu-22.04 # latest
1214 strategy :
1315 fail-fast : false
1416 matrix :
15- python-version : [ '3.11' ]
17+ python-version : ['3.11']
1618 name : Python ${{ matrix.python-version }}
1719 steps :
1820 - name : update OS (Ubuntu)
@@ -22,54 +24,55 @@ jobs:
2224 - run : sudo apt-get install gcc --only-upgrade
2325 - run : sudo locale-gen de_DE.UTF-8
2426 - run : locale -a
25- - uses : actions/checkout@v2
27+
28+ - uses : actions/checkout@v4
29+
2630 - name : Checkout SmartHomeNG DEVELOP Branch
27- uses : actions/checkout@v2
31+ uses : actions/checkout@v4
2832 with :
2933 repository : smarthomeNG/smarthome
3034 ref : develop
3135 path : smarthomeng
36+
3237 - name : Checkout SmartHomeNG/plugins DEVELOP Branch
33- uses : actions/checkout@v2
38+ uses : actions/checkout@v4
3439 with :
3540 repository : smarthomeNG/plugins
3641 ref : develop
3742 path : smarthomeng/plugins
43+
3844 - name : Set up Python
39- uses : actions/setup-python@v2
45+ uses : actions/setup-python@v5
4046 with :
4147 python-version : ${{ matrix.python-version }}
4248 architecture : x64
49+
4350 - name : Print Python Version
4451 run : python --version
45- - run : python3 -m pip install --upgrade pip # ==19.3.1
46- # - run: pip install tox-travis virtualenv>=20.0.8 -- upgrade
47- # - run: pip install sphinx sphinx_rtd_theme recommonmark ruamel.yaml pytest
52+
53+ - run : python3 -m pip install -- upgrade pip
54+
4855 - name : Install requirements for documentation build
4956 run : pip install -r smarthomeng/doc/requirements.txt
5057
5158 - name : Build Requirements for SmartHomeNG
5259 run : python3 smarthomeng/tools/build_requirements.py
60+
5361 - name : Install SmartHomeNG base requirements
5462 # base requirements are needed for building of documentation
5563 run : pip install -r smarthomeng/requirements/base.txt
64+
5665 - name : List installed packages
5766 run : pip list
5867
5968 - name : Build documentation
6069 working-directory : ./smarthomeng/doc
6170 run : bash ./build_doc_local.sh
6271
63- # - name: Deploy documentation
64- # uses: JamesIves/github-pages-deploy-action@v4.3.3
65- # with:
66- # branch: develop_doc # The branch the action should deploy to.
67- # folder: ./smarthomeng/doc/user/build/html # The folder the action should deploy.
68-
6972 - name : Deploy documentation to seperate repo dev_doc
7073 uses : JamesIves/github-pages-deploy-action@v4.3.3
7174 with :
72- branch : gh-pages # The branch the action should deploy to.
73- folder : ./smarthomeng/doc/user/build/html # The folder the action should deploy.
75+ branch : gh-pages
76+ folder : ./smarthomeng/doc/user/build/html
7477 repository-name : ' smarthomeNG/dev_doc'
7578 token : ${{ secrets.PAT_TOKEN }}
0 commit comments