4
4
push :
5
5
branches : [master]
6
6
paths :
7
- - ' **/* .py' # Trigger on any Python file changes in any directory
7
+ - ' data_science_tools/polars_vs_pandas .py' # Only trigger on this specific file
8
8
9
9
jobs :
10
10
build :
@@ -26,34 +26,11 @@ jobs:
26
26
# Install any other dependencies needed by your notebooks
27
27
pip install pandas polars
28
28
29
- - name : Export marimo notebooks
29
+ - name : Export marimo notebook
30
30
run : |
31
- mkdir -p marimo_notebooks
32
- # Get list of changed files that match the path pattern
33
- CHANGED_FILES=$(git diff --name-only ${{ github.event.before }} ${{ github.sha }} | grep "\.py$" || true)
34
-
35
- # Loop through each changed file
36
- for notebook in $CHANGED_FILES; do
37
- if [ -f "$notebook" ] && grep -q "import marimo" "$notebook"; then
38
- echo "Exporting notebook: $notebook"
39
- # Create subdirectory structure to maintain organization
40
- output_dir="marimo_notebooks/$(dirname "$notebook")"
41
- mkdir -p "$output_dir"
42
- marimo export html-wasm "$notebook" --output "$output_dir" --mode run
43
- fi
44
- done
45
-
46
- # Create an index.html that lists all notebooks
47
- echo "<html><head><title>Marimo Notebooks</title><style>body{font-family:sans-serif;max-width:800px;margin:0 auto;padding:20px}h1{color:#0066cc}</style></head><body><h1>Marimo Notebooks</h1><ul>" > marimo_notebooks/index.html
48
-
49
- # Find all HTML files and add them to the index
50
- find marimo_notebooks -name "*.html" ! -name "index.html" | sort | while read -r file; do
51
- rel_path="${file#marimo_notebooks/}"
52
- name=$(basename "$file" .html)
53
- echo "<li><a href=\"$rel_path\">$rel_path</a></li>" >> marimo_notebooks/index.html
54
- done
55
-
56
- echo "</ul></body></html>" >> marimo_notebooks/index.html
31
+ mkdir -p marimo_notebooks/
32
+ # Export the specific notebook
33
+ marimo export html-wasm "data_science_tools/polars_vs_pandas.py" --output marimo_notebooks/ --mode run
57
34
58
35
- name : 📦 Upload Pages Artifact
59
36
uses : actions/upload-pages-artifact@v3
0 commit comments