forked from epfl-lasa/modulo
-
Notifications
You must be signed in to change notification settings - Fork 1
47 lines (42 loc) · 1.29 KB
/
generate-docs.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
name: Generate and Deploy Documentation
on:
push:
branches:
- main
release:
types: [published]
workflow_dispatch:
jobs:
deploy:
name: Generate and Deploy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Generate docs
uses: mattnotmitt/doxygen-action@v1
with:
working-directory: 'doxygen'
doxyfile-path: 'doxygen.conf'
- name: Tag release version
if: ${{ github.event_name == 'release' }}
shell: bash
run: |
TAG="${GITHUB_REF#refs/tags/}"
TAG="${TAG/\//-}"
mkdir -p doxygen/docs/versions
sudo mv doxygen/docs/html doxygen/docs/versions/${TAG}
- name: Tag branch version
if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }}
shell: bash
run: |
BRANCH="${GITHUB_REF#refs/heads/}"
BRANCH="${BRANCH/\//-}"
mkdir -p doxygen/docs/versions
sudo mv doxygen/docs/html doxygen/docs/versions/${BRANCH}
- name: Deploy to documentation branch
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: docs
publish_dir: ./doxygen/docs
keep_files: true