Skip to content

Commit 951076b

Browse files
deploy.yml workflow instead of gh-pages package
1 parent d75980f commit 951076b

File tree

9 files changed

+158
-449
lines changed

9 files changed

+158
-449
lines changed

.github/workflows/deploy.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- main # Or your default branch
7+
8+
jobs:
9+
build-and-deploy:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout repository
14+
uses: actions/checkout@v3
15+
16+
- name: Set up Node.js
17+
uses: actions/setup-node@v3
18+
with:
19+
node-version: '20'
20+
21+
- name: Install dependencies
22+
run: npm install
23+
24+
- name: Build Jupyter Book
25+
run: npm run build:book
26+
27+
- name: Copy Jupyter Book to public
28+
run: npm run copy:book
29+
30+
- name: Build Vite application
31+
run: npm run build
32+
33+
- name: Setup Pages
34+
uses: actions/configure-pages@v3
35+
36+
- name: Upload artifact
37+
uses: actions/upload-pages-artifact@v2
38+
with:
39+
path: './dist'
40+
41+
- name: Deploy to GitHub Pages
42+
id: deployment
43+
uses: actions/deploy-pages@v2

jupyter-books/_config.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
html:
2+
baseurl: /notes/

jupyter-books/myst.yml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,12 @@ project:
66

77
site:
88
template: book-theme
9+
options:
10+
url: /notes/
911
nav:
10-
- file: intro # This maps to intro.md
11-
12-
# We will use a flat list first to guarantee the build works.
13-
# Once this passes, we can make it nested.
14-
- file: const-correctness
15-
title: C++ Engineering
16-
17-
- file: rendering-math
18-
title: Rendering & Math
12+
- title: Introduction
13+
url: /notes/intro.html
14+
- title: C++ Engineering
15+
url: /notes/const-correctness.html
16+
- title: Rendering & Math
17+
url: /notes/rendering-math.html

0 commit comments

Comments
 (0)