-
Notifications
You must be signed in to change notification settings - Fork 4
49 lines (43 loc) · 1.3 KB
/
render-stan-docs.yaml
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
# Based on https://github.com/mattnotmitt/doxygen-action
name: Render Stan documentation
on:
workflow_dispatch:
pull_request:
paths:
- 'inst/stan/**'
push:
branches:
- main
paths:
- 'inst/stan/**'
jobs:
# This workflow contains a single job called "build"
build:
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4
- name: Doxygen Action
uses: mattnotmitt/doxygen-action@v1.9.8
with:
# Path to Doxyfile
doxyfile-path: "Doxyfile"
# Working directory
working-directory: "./inst/stan/"
- name: Archive documentation
if: github.ref != 'refs/heads/main'
uses: actions/upload-artifact@v4
with:
name: stan-docs
path: ./inst/stan/html
if-no-files-found: error
- name: Deploy
if: github.ref == 'refs/heads/main'
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
# Default Doxyfile build documentation to html directory.
# Change the directory if changes in Doxyfile
publish_dir: ./inst/stan/html
destination_dir: stan