Skip to content

Commit 8fd690c

Browse files
add github workflow
1 parent a5856e2 commit 8fd690c

1 file changed

Lines changed: 49 additions & 0 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Deploy Marimo Notebook
2+
3+
on:
4+
push:
5+
branches: [main]
6+
paths:
7+
- dashboard.py
8+
- .github/workflows/deploy.yml
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- name: Set up Python
17+
uses: actions/setup-python@v4
18+
with:
19+
python-version: '3.11'
20+
21+
- name: Install marimo
22+
run: pip install marimo
23+
24+
- name: Export marimo notebook
25+
run: |
26+
marimo export html-wasm dashboard.py --output build --sandbox
27+
28+
- name: Upload artifact
29+
uses: actions/upload-pages-artifact@v3
30+
with:
31+
path: build
32+
33+
deploy:
34+
needs: build
35+
runs-on: ubuntu-latest
36+
environment:
37+
name: github-pages
38+
url: ${{ steps.deployment.outputs.page_url }}
39+
40+
permissions:
41+
pages: write
42+
id-token: write
43+
44+
steps:
45+
- name: 🌐 Deploy to GitHub Pages
46+
id: deployment
47+
uses: actions/deploy-pages@v4
48+
with:
49+
artifact_name: github-pages

0 commit comments

Comments
 (0)