-
-
Notifications
You must be signed in to change notification settings - Fork 26
58 lines (57 loc) · 2.1 KB
/
pollen.build.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
56
57
58
on:
workflow_call:
inputs:
tag:
description: 'The version tag to associate with this documentation build, e.g. "dev", "stable", "pr-201"'
required: true
default: "dev"
type: string
docdir:
description: "Path of the subdirectory where Pollen's Project.toml, make.jl, and project.jl are stored."
required: false
default: "docs/"
type: string
databranch:
description: "Branch where the generated documentation is stored"
required: false
default: "pollen"
type: string
juliaversion:
description: "Julia version to use when building the documentation"
required: false
default: "1.8"
type: string
jobs:
pollen:
name: "Pollen - Build documentation data"
runs-on: ubuntu-latest
steps:
# Check out the package directory at the branch that triggered
# the workflow
- uses: actions/checkout@v3
# Check out Pollen.jl's data branch, where the generated documentation
# data will be stored.
- uses: actions/checkout@v3
with:
ref: ${{inputs.databranch}}
path: pollen
# Install Julia
- uses: julia-actions/setup-julia@latest
with:
version: ${{inputs.juliaversion}}
# Install the package to-be-documented and its dependencies. Also adds
- name: "Install package and docs dependencies"
run: |
julia --color=yes --project=./${{inputs.docdir}} -e 'using Pkg; Pkg.add([Pkg.PackageSpec(path="."), Pkg.PackageSpec(url="https://github.com/lorenzoh/Pollen.jl", rev="main")]); Pkg.instantiate();'
# Build the documentation data and annotate it with the package tag
- name: Build
run: |
julia --color=yes --project=./${{inputs.docdir}} ./${{inputs.docdir}}/make.jl ./pollen/ ${{inputs.tag}}
- name: Deploy
run: |
cd pollen
git config user.name github-actions
git config user.email [email protected]
git add .
git commit -m "Build documentation data (Pollen.jl)"
git push