Skip to content

Commit b7182b1

Browse files
authored
Merge pull request #67 from ASFOpenSARlab/dp/update-deploy-environment
feat: migrate env manager to `mamba`
2 parents b078101 + b867b4a commit b7182b1

File tree

6 files changed

+23
-18
lines changed

6 files changed

+23
-18
lines changed

.github/workflows/deploy_jupyter_book.yaml

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,28 +22,27 @@ concurrency:
2222
jobs:
2323
deploy-book:
2424
runs-on: ubuntu-latest
25+
defaults:
26+
run:
27+
shell: bash -l {0}
2528
environment:
2629
name: github-pages
2730
url: ${{ steps.deployment.outputs.page_url }}
2831

2932
steps:
30-
- uses: actions/checkout@v4
33+
- uses: actions/checkout@v6
3134

32-
- name: Set up Python 3.11
33-
uses: actions/setup-python@v5
35+
- uses: actions/setup-python@v6
3436
with:
35-
python-version: '3.11'
36-
cache: pip # Implicitly uses requirements.txt for cache key
37+
python-version: '3.14'
3738

38-
- name: Install dependencies
39-
run: make install-deps
39+
- uses: mamba-org/setup-micromamba@v2
40+
with:
41+
environment-file: environment.yaml
4042

41-
- name: Build the book
42-
run: |
43-
make build
43+
- run: make build
4444

45-
- name: Upload artifact
46-
uses: actions/upload-pages-artifact@v3
45+
- uses: actions/upload-pages-artifact@v4
4746
with:
4847
path: "_build/html"
4948

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.PHONY := install-deps
22
install-deps:
3-
python3 -m pip install -r requirements.txt && \
3+
mamba env create -f environment.yaml && \
44
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash && \
55
\. "$$HOME/.nvm/nvm.sh" && \
66
nvm install 24

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,9 @@ Action, and includes a custom domain in the Pages settings in the repo.
1212

1313
### Local Development
1414

15-
Create a virtual environment with the tool of your choice, then you can install the
16-
dependencies (from `requirements.txt`) with `make install-deps`.
15+
With [`mamba`](https://mamba.readthedocs.io/en/latest/installation/mamba-installation.html)
16+
installed, `make install-deps` will create a local environment `docs` with all the
17+
dependencies installed.
1718

1819
`make serve` will start a Jupyter Book server, which includes hot reload on file save,
1920
so after you open the local server page in your browser, saving a file will

environment.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
name: docs
2+
channels:
3+
- conda-forge
4+
- nodefaults
5+
dependencies:
6+
- jupyter-book==2.1.0
7+
- mystmd==1.7.0

release-notes/release_07-2025.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Welcome to the June 2025 OpenScienceLab Update!
44

55
### Changes:
66

7-
We've upgraded our documentation to use [Jupyter Book version 2](https://next.jupyterbook.org/)!
7+
We've upgraded our documentation to use [Jupyter Book version 2](https://jupyterbook.org/)!
88

99
We've also updated the documentation to better reflect the current state of
1010
OpenScienceLab -- please note that the Developer Documentation is quite out of date and

requirements.txt

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)