summaryrefslogtreecommitdiff
path: root/.github/workflows/deploy-github-pages.yml
blob: d474a2754827676bfc643f6b9accfd41bb7a11c8 (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
name: Build and deploy github page

on:
  schedule:
    # Every weeks
    - cron: '30 19 * * SUN'
  workflow_dispatch:
    inputs:
      publish:
        description: 'Push to github page branch or not'
        required: true
        default: false
        type: boolean

jobs:
  build_and_deploy:
    name: 'Deploy doxygen page'
    runs-on: 'ubuntu-latest'
    if: github.repository_owner == 'Samsung'

    steps:
      - name: 'Checkout'
        uses: actions/checkout@v3
      - name: 'Generate HTML'
        uses: mattnotmitt/doxygen-action@v1.9
        with:
          doxyfile-path: 'infra/doxygen/Doxyfile'
      - name: 'Tar artifact'
        run: tar -zcf doxygen.tar.gz -C doxygen/html ./
      - name: 'Generate artifact'
        uses: actions/upload-artifact@v3
        with:
          name: doxygen-html
          path: doxygen.tar.gz
      - name: 'Deploy'
        if: ${{ github.event_name == 'schedule' || github.event.inputs.publish == 'true' }}
        uses: JamesIves/github-pages-deploy-action@v4
        with:
          folder: doxygen/html
          branch: gh-pages