aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/gh-pages.yml
blob: 18f269579c5f0e5038199ceaf7e51926f27b8f59 (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
name: GitHub Pages

on:
  push:
    branches:
      - master

jobs:
  Documentation:
    runs-on: ubuntu-20.04
    steps:
    - uses: actions/checkout@v3
    - name: Install dependencies
      run: |
        sudo apt update
        sudo apt install doxygen asciidoctor libconfig-dev libssl-dev mscgen cmake graphviz libdpdk-dev
        sudo gem install asciidoctor
    - name: Build
      run: |
        ./bootstrap
        ./configure --enable-user-guides
        pushd doc
        make
        popd
        # Doxygen does not trap on warnings so check for them here
        make doxygen-doc 2>&1 | tee ./doxygen.log
        ! fgrep -rq warning ./doxygen.log

    - name: Before deploy
      run: |
        pushd doc
        mkdir gh-pages
        cp -r application-api-guide/output/html/* gh-pages/
        cp -r platform-api-guide/output/html/ gh-pages/platform-api-guide
        cp -r helper-guide/output/html/ gh-pages/helper-guide
        mkdir gh-pages/implementers-guide
        cp implementers-guide/implementers-guide.html gh-pages/implementers-guide/index.html
        mkdir gh-pages/users-guide
        cp users-guide/users-guide.html gh-pages/users-guide/index.html
        mkdir gh-pages/process-guide
        cp process-guide/*.html gh-pages/process-guide/
        touch gh-pages/.nojekyll
        popd

    - name: Deploy
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
      uses: crazy-max/ghaction-github-pages@v2
      with:
        allow_empty_commit: false
        build_dir: ./doc/gh-pages
        target_branch: gh-pages