-
Notifications
You must be signed in to change notification settings - Fork 16
/
action.yml
66 lines (59 loc) · 2.16 KB
/
action.yml
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
name: 'Doxygen GitHub Pages Deploy Action'
author: 'Jonah Lawrence'
description: 'Make docs with Doxygen then deploy the generated HTML to GitHub pages'
branding:
icon: "upload-cloud"
color: "purple"
inputs:
github_token:
description: 'A GitHub token for pushing to the repo. Example: https://git.io/passing-token'
required: true
branch:
description: 'Branch name for pushing GitHub pages files'
required: true
default: "gh-pages"
folder:
description: 'Folder where Doxygen will generate the HTML build files'
required: true
default: "docs/html"
config_file:
description: 'Path of the Doxygen configuration file'
required: true
default: "Doxyfile"
target_folder:
description: 'Directory on the deployment branch for pushing the build files'
required: false
doxygen_version:
description: 'Version of Doxygen to install'
required: false
default: "1.9.6"
runs:
using: "composite"
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: "true"
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y wget graphviz
shell: bash
- name: Install Doxygen v${{ inputs.doxygen_version }}
run: |
transformed_version=$(echo "${{ inputs.doxygen_version }}" | tr '.' '_')
wget https://github.com/doxygen/doxygen/releases/download/Release_${transformed_version}/doxygen-${{ inputs.doxygen_version }}.linux.bin.tar.gz
tar -xzf doxygen-${{ inputs.doxygen_version }}.linux.bin.tar.gz
sudo mv doxygen-${{ inputs.doxygen_version }}/bin/doxygen /usr/local/bin/doxygen
shell: bash
- name: Generate Doxygen Documentation
run: doxygen ${{ inputs.config_file }}
shell: bash
- name: Create .nojekyll (ensures pages with underscores work on gh pages)
run: touch ${{ inputs.folder }}/.nojekyll
shell: bash
- name: Deploy to GitHub Pages
uses: JamesIves/github-pages-deploy-action@v4
with:
token: ${{ inputs.github_token }}
branch: ${{ inputs.branch }}
folder: ${{ inputs.folder }}
target-folder: ${{ inputs.target_folder }}