-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (52 loc) · 1.61 KB
/
publish-quarto.yaml
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
on:
workflow_dispatch:
push:
branches: main
name: Quarto Publish
permissions:
contents: write
pages: write
jobs:
build-deploy:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout Quarto Book
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Quarto
uses: quarto-dev/quarto-actions/setup@v2
- name: Install Python and Jupyter
uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: 'pip'
- run: pip install jupyter jupyter-cache
- name: Cache Environment
uses: actions/cache@v4
with:
path: |
~/.local/share/jupyter/kernels
~/.cache/pip
/usr/share/miniconda/envs
./chapters/courses/.jupyter_cache
./chapters/courses/microwave-remote-sensing/.jupyter_cache
./chapters/templates/.jupyter_cache
./chapters/tutorials/.jupyter_cache
key: ${{ runner.os }}-env-${{ hashFiles('./environment.yml', './notebooks/**/*.yml') }}
restore-keys: ${{ runner.os }}-env-
- name: Render and Publish
id: setup-python
uses: quarto-dev/quarto-actions/publish@v2
with:
target: gh-pages
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# - name: Cache Binder Build on mybinder.org
# uses: jupyterhub/repo2docker-action@master
# with:
# NO_PUSH: true
# MYBINDERORG_TAG: ${{ github.event.ref }}
# REPO2DOCKER_EXTRA_ARGS: --subdir notebooks