blob: 9a25537b8834b12a43d730d9b20dc4f36810d325 [file] [log] [blame]
Vivien Nicolasfbbf1272020-10-02 20:08:13 +02001# Copyright (c) 2020 Project CHIP Authors
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15name: Doxygen
16
17on:
Michael Spang7ef91f92021-04-12 02:32:59 -040018 push:
Victor Morales92f83432022-01-27 15:00:29 -080019 paths:
Justin Wood4f47a332022-03-04 15:54:19 -080020 - "**.do[xc]"
21 - "**.c[cs]?"
22 - "**.cxx"
23 - "**.cpp"
Arkadiusz Bokowy4895dc62023-02-11 01:15:55 +010024 - "**.c\\+\\+"
Justin Wood4f47a332022-03-04 15:54:19 -080025 - "**.ii"
26 - "**.ixx"
27 - "**.ipp"
Arkadiusz Bokowy4895dc62023-02-11 01:15:55 +010028 - "**.i\\+\\+"
Justin Wood4f47a332022-03-04 15:54:19 -080029 - "**.inl"
30 - "**.[hH]"
31 - "**.hh"
32 - "**.HH"
33 - "**.hxx"
34 - "**.hpp"
Arkadiusz Bokowy4895dc62023-02-11 01:15:55 +010035 - "**.h\\+\\+"
Justin Wood4f47a332022-03-04 15:54:19 -080036 - "**.mm"
37 - "**.txt"
38 - "**.[ido]dl"
39 - "**.java"
40 - "**.d"
41 - "**.php[45]?"
42 - "**.inc"
43 - "**.phtml"
44 - "**.[mM]"
Michael Spang7ef91f92021-04-12 02:32:59 -040045 pull_request:
Victor Morales92f83432022-01-27 15:00:29 -080046 paths:
Justin Wood4f47a332022-03-04 15:54:19 -080047 - "**.do[xc]"
48 - "**.c[cs]?"
49 - "**.cxx"
50 - "**.cpp"
Arkadiusz Bokowy4895dc62023-02-11 01:15:55 +010051 - "**.c\\+\\+"
Justin Wood4f47a332022-03-04 15:54:19 -080052 - "**.ii"
53 - "**.ixx"
54 - "**.ipp"
Arkadiusz Bokowy4895dc62023-02-11 01:15:55 +010055 - "**.i\\+\\+"
Justin Wood4f47a332022-03-04 15:54:19 -080056 - "**.inl"
57 - "**.[hH]"
58 - "**.hh"
59 - "**.HH"
60 - "**.hxx"
61 - "**.hpp"
Arkadiusz Bokowy4895dc62023-02-11 01:15:55 +010062 - "**.h\\+\\+"
Justin Wood4f47a332022-03-04 15:54:19 -080063 - "**.mm"
64 - "**.txt"
65 - "**.[ido]dl"
66 - "**.java"
67 - "**.d"
68 - "**.php[45]?"
69 - "**.inc"
70 - "**.phtml"
71 - "**.[mM]"
Damian Królikbfc72542021-06-01 19:55:22 +020072 workflow_dispatch:
Vivien Nicolasfbbf1272020-10-02 20:08:13 +020073
Justin Woodbf8b16b2021-06-15 20:36:09 -070074concurrency:
Justin Wooded637ad2021-07-03 07:39:13 -070075 group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }}
Justin Woodbf8b16b2021-06-15 20:36:09 -070076 cancel-in-progress: true
Justin Wood4f47a332022-03-04 15:54:19 -080077
Vivien Nicolasfbbf1272020-10-02 20:08:13 +020078jobs:
Justin Woodfff0cc52021-03-10 18:39:35 -080079 doxygen:
Justin Wood73f3d5b2021-03-10 13:11:28 -080080 name: Build Doxygen
Justin Wood9efd5c02021-06-02 19:03:02 -070081
Arkadiusz Bokowy4895dc62023-02-11 01:15:55 +010082 runs-on: ubuntu-latest
Victor Moralesf7f1cc32021-11-30 08:31:47 -080083 container:
Justin Woodf0adeef2023-07-14 11:51:49 -070084 image: ghcr.io/project-chip/chip-build-doxygen:1
Victor Moralesf7f1cc32021-11-30 08:31:47 -080085
Justin Wood469e8eb2021-03-24 12:06:43 -070086 if: github.actor != 'restyled-io[bot]'
Vivien Nicolasfbbf1272020-10-02 20:08:13 +020087
88 steps:
Justin Wood86511a12021-11-08 12:07:01 -080089 - name: "Print Actor"
90 run: echo ${{github.actor}}
Arkadiusz Bokowy4895dc62023-02-11 01:15:55 +010091 - name: Checkout
dependabot[bot]4f879712023-07-11 17:30:32 +000092 uses: actions/checkout@v3
Vivien Nicolasfbbf1272020-10-02 20:08:13 +020093 - name: Generate
94 run: scripts/helpers/doxygen.sh
Justin Wood73f3d5b2021-03-10 13:11:28 -080095 - name: Extract branch name
96 shell: bash
97 run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF##*/})"
98 id: extract_branch
99 - name: Deploy if master
Damian Królik499fa462021-06-08 22:09:14 +0200100 if: steps.extract_branch.outputs.branch == 'master' && github.repository == 'project-chip/connectedhomeip'
Justin Wood9d87afe2021-03-10 05:58:07 -0800101 uses: peaceiris/actions-gh-pages@v3
102 with:
Damian Królikbfc72542021-06-01 19:55:22 +0200103 deploy_key: ${{ secrets.DOXYGEN_DEPLOY_KEY }}
104 external_repository: project-chip/connectedhomeip-doc
Justin Wood9d87afe2021-03-10 05:58:07 -0800105 publish_dir: ./docs/html
Damian Królikbfc72542021-06-01 19:55:22 +0200106 # Keep only the latest version of the documentation
107 force_orphan: true