-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (44 loc) · 1.76 KB
/
documentation.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
name: Documentation
# This is a standard Julia setup for GitHub CI
on:
push:
branches:
- main # update to match your main branch
tags: '*'
pull_request:
jobs:
build:
permissions:
contents: write
pull-requests: read
statuses: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
version: '1'
- uses: julia-actions/cache@v1
# Now this is where things focus on the documentation
# build and deployment.
# IMPORTANT! If your documentation is for a Julia package,
# with formal Julia package structure (`src` folder and top level Project.toml)
# then you need to include this extra step (simply uncomment it):
- name: Develop local package
run: julia -e 'using Pkg; Pkg.develop(path="."); Pkg.instantiate()'
# The next steps continue with the `doc` folder build.
# This is really all you care about; 2-steps process
# step 1, assumming the documentation Project.toml file is in `docs` folder
- name: Install docs dependencies
run: julia --project=docs/ -e 'using Pkg; Pkg.instantiate()'
# step 2 (note project path remains the same!)
- name: Build and deploy
env:
# An access token must be provided to "push" the documentation build.
# GitHub automates this via your account with this line:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# See the discussion around "TagBot" in the Documenter.jl website:
# https://documenter.juliadocs.org/stable/man/hosting/#GitHub-Actions
# for automating creating tagged documentation builds after
# registering your package in the Julia General Registry
run: julia --project=docs/ docs/make.jl