-
-
Notifications
You must be signed in to change notification settings - Fork 10
55 lines (53 loc) · 1.95 KB
/
documenter.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
name: Documenter
on:
push:
branches: [main]
tags: [v*]
pull_request:
schedule:
- cron: "0 0 * * *"
env:
CMDSTAN_VERSION: "2.34.1"
CMDSTAN_PATH: "${{ GITHUB.WORKSPACE }}/.cmdstan/"
JULIA_NUM_THREADS: 2
jobs:
docs:
name: Documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
- uses: julia-actions/cache@v2
- name: Cache CondaPkg
id: cache-condaPkg
uses: actions/cache@v4
env:
cache-name: cache-condapkg
with:
path: docs/.CondaPkg
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('docs/CondaPkg.toml') }}
restore-keys: |
${{ runner.os }}-${{ env.cache-name }}-
- name: Cache CmdStan
id: cache-cmdstan
uses: actions/cache@v4
with:
path: ${{ env.CMDSTAN_PATH }}
key: cmdstan-${{ env.CMDSTAN_VERSION }}-${{ runner.os }}
- name: Download and build CmdStan
if: steps.cache-cmdstan.outputs.cache-hit != 'true'
run: |
wget -P ${{ env.CMDSTAN_PATH }} https://github.com/stan-dev/cmdstan/releases/download/v${{ env.CMDSTAN_VERSION }}/cmdstan-${{ env.CMDSTAN_VERSION }}.tar.gz
tar -xzpf ${{ env.CMDSTAN_PATH }}/cmdstan-${{ env.CMDSTAN_VERSION }}.tar.gz -C ${{ env.CMDSTAN_PATH }}
make -C ${{ env.CMDSTAN_PATH }}/cmdstan-${{ env.CMDSTAN_VERSION }}/ build
shell: bash
- uses: julia-actions/julia-buildpkg@v1
- name: Install dependencies
run: julia --color=yes --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()'
- uses: julia-actions/julia-docdeploy@v1
with:
install-package: false
env:
CMDSTAN: ${{ env.CMDSTAN_PATH }}/cmdstan-${{ env.CMDSTAN_VERSION }}/ # required by StanSample.jl
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}