Skip to content

Commit 157811d

Browse files
doc: quarto deployment of notebooks
1 parent ca3afad commit 157811d

3 files changed

Lines changed: 44 additions & 0 deletions

File tree

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Publish Quarto Notebooks
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- notebook_output
8+
9+
jobs:
10+
build-deploy:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout repository
15+
uses: actions/checkout@v4
16+
with:
17+
fetch-depth: 0 # Needed to push to gh-pages
18+
19+
- name: Setup Quarto
20+
uses: quarto-dev/quarto-actions/setup@v2
21+
22+
- name: Render notebooks site
23+
run: |
24+
cd notebooks
25+
quarto render
26+
27+
- name: Deploy Quarto notebooks to gh-pages/notebooks
28+
uses: peaceiris/actions-gh-pages@v3
29+
with:
30+
github_token: ${{ secrets.GITHUB_TOKEN }}
31+
publish_branch: gh-pages
32+
publish_dir: notebooks/_site
33+
destination_dir: notebooks
34+
keep_files: true # <-- keeps existing Sphinx docs untouched

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,3 +178,8 @@ poetry.lock
178178
.vscode/
179179

180180
benchmark_results/
181+
182+
example_files/
183+
_site/
184+
.quarto/
185+
**/*.quarto_ipynb

notebooks/_quarto.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
project:
2+
type: website
3+
4+
website:
5+
title: "Example notebooks"

0 commit comments

Comments
 (0)