Skip to content

Commit

Permalink
update GHA, fix versions, slim envs when possible
Browse files Browse the repository at this point in the history
  • Loading branch information
ocefpaf committed Dec 13, 2024
1 parent 49142b9 commit 9571828
Show file tree
Hide file tree
Showing 6 changed files with 51 additions and 24 deletions.
16 changes: 7 additions & 9 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,25 +10,23 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Setup Micromamba
uses: mamba-org/setup-micromamba@068f1ab4b37ed9b3d9f73da7db90a0cda0a48d29 #v1
- name: Set up Python
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
with:
environment-name: IOOS
init-shell: bash
create-args: >-
--file .binder/conda-lock.yml
python-version: "3.x"


- name: Build documentation
shell: bash -l {0}
run: >
set -e
&& pip install jupyter-book
&& jupyter-book build jupyterbook
- name: GitHub Pages action
if: github.ref == 'refs/heads/main'
uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e #v4
uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4.0.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: jupyterbook/_build/html
32 changes: 32 additions & 0 deletions .github/workflows/docs-linkchecker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Build and Deploy docs

on:
pull_request:
push:
branches: [main]

jobs:
build-docs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Set up Python
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
with:
python-version: "3.x"


- name: Build documentation
run: >
set -e
&& pip install jupyter-book
&& jupyter-book build jupyterbook --builder linkcheck
- name: GitHub Pages action
if: github.ref == 'refs/heads/main'
uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4.0.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: jupyterbook/_build/html
9 changes: 2 additions & 7 deletions .github/workflows/test-env.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ jobs:
shell: bash -l {0}

steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Setup Micromamba
uses: mamba-org/setup-micromamba@068f1ab4b37ed9b3d9f73da7db90a0cda0a48d29 #v1
uses: mamba-org/setup-micromamba@068f1ab4b37ed9b3d9f73da7db90a0cda0a48d29 # v2.0.3
with:
environment-name: IOOS
init-shell: bash
Expand All @@ -28,8 +28,3 @@ jobs:
- name: Test environment
run: >
python -c 'import osgeo.gdal; print(dir(osgeo.gdal))'
- name: Test links
if: startsWith(matrix.os, 'ubuntu')
run: >
jupyter-book build jupyterbook --builder linkcheck
7 changes: 4 additions & 3 deletions .github/workflows/test_data_access_notebooks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Setup Micromamba
uses: mamba-org/setup-micromamba@068f1ab4b37ed9b3d9f73da7db90a0cda0a48d29 #v1
uses: mamba-org/setup-micromamba@068f1ab4b37ed9b3d9f73da7db90a0cda0a48d29 # v2.0.3
with:
environment-name: IOOS
init-shell: bash
Expand All @@ -20,5 +20,6 @@ jobs:
- name: Notebook tests
shell: bash -l {0}
run: |
run: >
&& micromamba install nbval
python -m pytest --nbval --nbval-lax jupyterbook/content/code_gallery/data_access_notebooks/
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Setup Micromamba
uses: mamba-org/setup-micromamba@068f1ab4b37ed9b3d9f73da7db90a0cda0a48d29 #v1
uses: mamba-org/setup-micromamba@068f1ab4b37ed9b3d9f73da7db90a0cda0a48d29 # v2.0.3
with:
environment-name: IOOS
init-shell: bash
Expand All @@ -20,5 +20,6 @@ jobs:
- name: Notebook tests
shell: bash -l {0}
run: |
run: >
&& micromamba install nbval
python -m pytest --nbval --nbval-lax jupyterbook/content/code_gallery/data_analysis_and_visualization_notebooks/
4 changes: 2 additions & 2 deletions .github/workflows/test_data_management_notebooks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Setup Micromamba
uses: mamba-org/setup-micromamba@068f1ab4b37ed9b3d9f73da7db90a0cda0a48d29 #v1
uses: mamba-org/setup-micromamba@068f1ab4b37ed9b3d9f73da7db90a0cda0a48d29 # v2.0.3
with:
environment-name: IOOS
init-shell: bash
Expand Down

0 comments on commit 9571828

Please sign in to comment.