-
Notifications
You must be signed in to change notification settings - Fork 21
72 lines (63 loc) · 2.06 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
68
69
70
71
72
name: Quarto documentation
on:
push:
branches: [master]
tags: [v*]
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
# needed to allow julia-actions/cache to delete old caches that it has created
permissions:
actions: write
contents: read
jobs:
publish:
name: Build and publish docs
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: julia-actions/cache@v2
with:
cache-compiled: "true"
cache-registries: "true"
- uses: prefix-dev/[email protected]
with:
pixi-version: "latest"
- name: Prepare pixi
run: pixi run install-ci
- name: Install Quarto
uses: quarto-dev/quarto-actions/setup@v2
- name: Check Quarto installation and all engines
run: pixi run quarto-check
- name: Render Quarto Project
run: pixi run quarto-render
- name: Publish Quarto Project as preview
if: github.event_name == 'pull_request'
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/_site
destination_dir: previews/PR${{ github.event.number }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Publish Quarto Project as dev
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/_site
destination_dir: dev
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Publish Quarto Project as version
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/_site
destination_dir: ${{ github.ref_name }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}