-
Notifications
You must be signed in to change notification settings - Fork 1
82 lines (82 loc) · 2.76 KB
/
pages.yml
File metadata and controls
82 lines (82 loc) · 2.76 KB
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
73
74
75
76
77
78
79
80
81
82
name: Deploy notebooks to GitHub Pages
on:
push:
branches: [main]
paths:
- "notebooks/debye_waller.py"
- "notebooks/nanoparticle_builder.py"
- ".github/workflows/pages.yml"
workflow_dispatch:
permissions:
contents: read
concurrency:
group: pages
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: 📥 Checkout
uses: actions/checkout@v4
- name: 🐍 Install uv
uses: astral-sh/setup-uv@v7
with:
version: "0.10.5"
python-version: "3.12"
- name: 📄 Export debye_waller notebook
run: |
uv run marimo export html-wasm notebooks/debye_waller.py \
-o _site/notebooks/debye_waller \
--mode run
- name: 📄 Export nanoparticle_builder notebook
run: |
uv run marimo export html-wasm notebooks/nanoparticle_builder.py \
-o _site/notebooks/nanoparticle_builder \
--mode run
- name: 🏠 Create index page
run: |
cat > _site/index.html << 'EOF'
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>ALC DLS EXAFS Notebooks</title>
<style>
body { font-family: system-ui, sans-serif; max-width: 640px; margin: 4rem auto; padding: 0 1rem; }
h1 { font-size: 1.5rem; margin-bottom: 0.5rem; }
p { color: #555; margin-bottom: 2rem; }
ul { list-style: none; padding: 0; }
li { margin: 0.75rem 0; }
a { display: inline-block; padding: 0.6rem 1.2rem; background: #1a73e8;
color: #fff; border-radius: 6px; text-decoration: none; font-weight: 500; }
a:hover { background: #1558b0; }
</style>
</head>
<body>
<h1>ALC DLS EXAFS Notebooks</h1>
<p>Interactive marimo notebooks running entirely in the browser via WebAssembly.</p>
<ul>
<li><a href="notebooks/debye_waller/index.html">MD Debye-Waller & FEFF Analysis</a></li>
<li><a href="notebooks/nanoparticle_builder/index.html">Nanoparticle Builder</a></li>
</ul>
</body>
</html>
EOF
- name: 📦 Upload Pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: _site
deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
permissions:
pages: write
id-token: write
steps:
- name: 🌐 Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4