-
Notifications
You must be signed in to change notification settings - Fork 5
67 lines (60 loc) · 1.9 KB
/
docs.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
59
60
61
62
63
64
65
66
67
name: docs
on:
push:
branches: [main]
pull_request:
jobs:
publish:
name: Julia ${{ matrix.version }} - ${{ matrix.arch }} - ${{ github.event_name }}
runs-on: ubuntu-latest
permissions:
contents: write
strategy:
matrix:
version:
- "~1.9.0-0" # make sure to keep this in sync with _quarto.yml
arch:
- x64
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- uses: julia-actions/julia-buildpkg@v1
env:
JULIA_PKG_SERVER: "pkg.julialang.org"
- uses: actions/cache@v1
env:
cache-name: cache-artifacts
with:
path: ~/.julia/artifacts
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
restore-keys: |
${{ runner.os }}-test-${{ env.cache-name }}-
${{ runner.os }}-test-
# setup Python / Jupyter
- uses: actions/setup-python@v4
with:
python-version: '3.x'
# avoid jupyter-client 8: https://github.com/quarto-dev/quarto-cli/issues/4122
- run: pip install jupyter jupyter-client==7.4.9
- name: Install IJulia
run: julia -e 'using Pkg; Pkg.add("IJulia")'
- name: Set up Quarto
uses: quarto-dev/quarto-actions/setup@v2
- name: Check Quarto install
run: quarto check install
- name: Check Quarto kernels
run: quarto check jupyter
- name: Render Quarto Project
run: "quarto render docs --to html --execute"
- name: Publish Quarto Project
if: github.event_name != 'pull_request'
uses: quarto-dev/quarto-actions/publish@v2
with:
path: docs
render: false
target: gh-pages
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}