Skip to content

Documenter

Documenter #1232

Workflow file for this run

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 }}