Last active
November 1, 2025 22:47
-
-
Save williambdean/9abd722feb18abe1c79362aed55ad225 to your computer and use it in GitHub Desktop.
Automate marimo notebook as documentation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # .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