-
Notifications
You must be signed in to change notification settings - Fork 0
80 lines (67 loc) · 1.9 KB
/
Copy pathDocumentation.yml
File metadata and controls
80 lines (67 loc) · 1.9 KB
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
name: Documentation
on:
push:
branches:
- main
tags: '*'
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build-docs:
name: Build
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
version: '1'
- uses: julia-actions/cache@v2
- name: Install dependencies
run: |
julia --project=docs -e '
using Pkg
Pkg.develop(PackageSpec(path=pwd()))
Pkg.instantiate()'
- name: Build documentation
run: julia --project=docs docs/make.jl
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload build artifact
uses: actions/upload-artifact@v4
with:
name: documentation-build
path: docs/build/
retention-days: 7
deploy-docs:
name: Deploy
needs: build-docs
runs-on: ubuntu-latest
# Deploy on pushes to main or tags, and PRs from the same repo (not forks)
if: github.event_name == 'push' || (github.event_name == 'pull_request' && !github.event.pull_request.head.repo.fork)
permissions:
contents: write
pull-requests: read
statuses: write
concurrency:
group: docs-deploy
cancel-in-progress: false
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
version: '1'
- uses: actions/download-artifact@v4
with:
name: documentation-build
path: docs/build/
- name: Install Documenter
run: julia -e 'using Pkg; Pkg.add("Documenter")'
- name: Deploy documentation
run: julia docs/deploy.jl
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}