summaryrefslogtreecommitdiff
path: root/.github/workflows/doxygen.yml
blob: cbd03b758a3a09ab390abc4f52fef9389b07fb86 (plain)
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: doc_doxygen
on:
  pull_request:
    branches:
      - master
    paths:
      - 'documentation/**'
      - 'src/**'
      - 'include/**'
      - 'components/finsh/**'
      - 'components/drivers/include/drivers/**'
      - 'components/drivers/clk/**'
      - 'components/drivers/audio/**'
      - 'components/dfs/dfs_v2/src/**'
      - 'components/dfs/dfs_v2/include/**'
      - '.github/workflows/doxygen.yml'
  # Runs at 16:00 UTC (BeiJing 00:00) on the 30st of every month
  push:
    branches: [master]
    paths:
      - 'documentation/**'
      - 'src/**'
      - 'include/**'
      - 'components/finsh/**'
      - 'components/drivers/include/drivers/**'
      - 'components/drivers/clk/**'
      - 'components/drivers/audio/**'
      - 'components/dfs/dfs_v2/src/**'
      - 'components/dfs/dfs_v2/include/**'
      - '.github/workflows/doxygen.yml'
  schedule:
    - cron:  '0 16 30 * *'
  workflow_dispatch:

concurrency:
  group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
  cancel-in-progress: true
  
permissions:
  contents: read
  pages: write
  id-token: write
  
jobs:
  build:
    runs-on: ubuntu-22.04
    name: doxygen_doc generate
    if: github.repository_owner == 'RT-Thread'
    steps:
      - uses: actions/checkout@main
        with:
          submodules: 'recursive'
      - name: Install Tools
        shell: bash
        run: |
          sudo apt-get update
          sudo apt-get -qq install doxygen graphviz
      - name: generate doxygen html
        shell: bash
        run: |
          cd documentation
          doxygen Doxyfile.1.9.1
          cat Doxyfile.1.9.1
          
      - name: Upload static files as artifact
        id: deployment
        uses: actions/upload-pages-artifact@main # or specific "vX.X.X" version tag for this action
        with:
          path: documentation/html/
          
  deploy:
    if: github.event_name == 'push'
    environment:
      name: github-pages
      url: ${{ steps.deployment.outputs.page_url }}
    runs-on: ubuntu-22.04
    needs: build
    steps:
      - name: Deploy to GitHub Pages
        id: deployment
        uses: actions/deploy-pages@main