Skip to content

Commit 43f41c7

Browse files
committed
publish html on gh pages
1 parent 18f5ff3 commit 43f41c7

File tree

3 files changed

+80
-4
lines changed

3 files changed

+80
-4
lines changed
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# NOTE THAT in addition to this file, you need to check on github.com
2+
# - enable github pages (select deploy from a branch)
3+
# - go to the Settings -> Environments tab
4+
# then select the 'github-pages' environment
5+
# and make sure the branch of interest (here main) is allowed in the 'Branch protection rules' area
6+
7+
name: Deploy MyST to GitHub Pages
8+
9+
on:
10+
# Allows manual trigger
11+
workflow_dispatch:
12+
push:
13+
branches:
14+
- main
15+
16+
17+
# the following sets permissions of the GITHUB_TOKEN
18+
# to allow deployment to GitHub Pages
19+
permissions:
20+
contents: read
21+
pages: write
22+
id-token: write
23+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
24+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
25+
concurrency:
26+
group: "pages"
27+
cancel-in-progress: false
28+
29+
30+
# this is no longer needed as we serve from info-mines.paris
31+
# required for MyST
32+
# env:
33+
# # `BASE_URL` determines the website is served from, including CSS & JS assets
34+
# # You may need to change this to `BASE_URL: ''`
35+
# BASE_URL: /${{ github.event.repository.name }}
36+
37+
38+
jobs:
39+
build-and-deploy:
40+
runs-on: ubuntu-latest
41+
steps:
42+
- name: Checkout repository
43+
uses: actions/checkout@v4
44+
- uses: actions/setup-node@v4
45+
with:
46+
node-version: 24
47+
- name: Install MyST Markdown
48+
run: npm install -g mystmd
49+
- name: Install requirements.txt
50+
run: "if [ -f requirements.txt ]; then pip install -r requirements.txt; fi"
51+
- name: Build HTML Assets
52+
run: (cd notebooks; myst build --execute --html)
53+
- name: Setup Pages
54+
uses: actions/configure-pages@v3
55+
- name: Upload artifact
56+
uses: actions/upload-pages-artifact@v3
57+
with:
58+
path: './notebooks/_build/html'
59+
- name: Deploy to GitHub Pages
60+
id: deployment
61+
uses: actions/deploy-pages@v4
62+
63+
environment:
64+
name: github-pages
65+
url: ${{ steps.deployment.outputs.page_url }}

myst.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ project:
2222
date: 2025-10-22
2323
# bibliography: []
2424
settings:
25-
# this is too aggressive, and remove things like <module ...>
25+
# this is too aggressive, and remove things like <module ...>
2626
# that we sometimes want to show
2727
output_matplotlib_strings: warn
2828

requirements.txt

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,25 @@
1-
jupytext[myst]
2-
# jupyterlab
1+
jupyter
2+
jupyterlab-myst
3+
jupyterlab-gridwidth
4+
jupyterlab-hidecell
5+
jupytext
6+
37
ipywidgets
4-
jupyter-contrib-nbextensions
8+
ipythontutor
9+
nbautoeval
10+
511
numpy
612
matplotlib
713
pandas
814
plotly
915
chart-studio
16+
jupyter-bokeh
1017
bokeh
1118
seaborn
19+
20+
autograd
21+
k3d
22+
1223
aiohttp
1324
nbautoeval
1425
k3d

0 commit comments

Comments
 (0)