Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 24 additions & 6 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,26 @@ on:
branches:
- main

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: pages
cancel-in-progress: false

jobs:
build-and-deploy-book:
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

- name: Install uv
uses: astral-sh/setup-uv@v3
uses: astral-sh/setup-uv@v8.1.0
with:
python-version: "3.11"

Expand All @@ -22,8 +34,14 @@ jobs:
- name: Build the book
run: uv run jupyter-book build jupyterbook

- name: GitHub Pages action
uses: peaceiris/actions-gh-pages@v4
- name: Verify build output
run: test -s jupyterbook/_build/html/index.html

- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v5
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: jupyterbook/_build/html
path: jupyterbook/_build/html

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v5
12 changes: 6 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v3
- uses: actions/checkout@v6
- uses: astral-sh/setup-uv@v8.1.0
with:
python-version: "3.11"
- run: uv sync --extra dev
Expand All @@ -23,8 +23,8 @@ jobs:
type:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v3
- uses: actions/checkout@v6
- uses: astral-sh/setup-uv@v8.1.0
with:
python-version: "3.11"
- run: uv sync --extra dev
Expand All @@ -38,8 +38,8 @@ jobs:
matrix:
python-version: ["3.11"]
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v3
- uses: actions/checkout@v6
- uses: astral-sh/setup-uv@v8.1.0
with:
python-version: ${{ matrix.python-version }}
- run: uv sync --extra tests
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Homepage = "https://github.com/spaceml-org/ml4floods"
[project.optional-dependencies]
dev = ["ruff", "mypy", "pre-commit", "pyprojroot"]
tests = ["pytest"]
docs = ["furo", "nbsphinx", "sphinx-copybutton", "jupyter-book", "ghp-import"]
docs = ["jupyter-book<2", "ghp-import"]
serve = ["flask", "gunicorn"]
cloudmasks = ["segmentation-models-pytorch", "s2cloudless"]
kappazeta = ["tensorflow"]
Expand Down
Loading
Loading