Skip to content

Instantly share code, notes, and snippets.

@williambdean
Last active November 1, 2025 22:47
Show Gist options
  • Select an option

  • Save williambdean/9abd722feb18abe1c79362aed55ad225 to your computer and use it in GitHub Desktop.

Select an option

Save williambdean/9abd722feb18abe1c79362aed55ad225 to your computer and use it in GitHub Desktop.
Automate marimo notebook as documentation
import marimo
__generated_with = "0.17.6"
app = marimo.App(width="medium")
@app.cell
def _():
import marimo as mo
mo.md("""
## My Documentation
Find all about my project documentation.
""")
return
@app.cell
def _():
return
if __name__ == "__main__":
app.run()
# .github/workflows/docs.yml
---
name: Documentation
on:
push:
branches:
- main
paths:
- docs.py
jobs:
create-docs:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v5
- name: Install uv
uses: astral-sh/setup-uv@v7
- name: Install the project
run: uv sync --locked --all-extras
- name: Generate documentation
run: uv run marimo export html-wasm docs.py -o docs/index.html --mode run
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment