diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml index 900a9c30..c3ec1d08 100644 --- a/.github/workflows/deploy-docs.yml +++ b/.github/workflows/deploy-docs.yml @@ -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 diff --git a/.github/workflows/docs-linkchecker.yml b/.github/workflows/docs-linkchecker.yml new file mode 100644 index 00000000..a6d0a797 --- /dev/null +++ b/.github/workflows/docs-linkchecker.yml @@ -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 diff --git a/.github/workflows/test-env.yml b/.github/workflows/test-env.yml index ad26f13d..1d61d20b 100644 --- a/.github/workflows/test-env.yml +++ b/.github/workflows/test-env.yml @@ -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 @@ -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 diff --git a/.github/workflows/test_data_access_notebooks.yml b/.github/workflows/test_data_access_notebooks.yml index 1d9b7bc4..d7ffd786 100644 --- a/.github/workflows/test_data_access_notebooks.yml +++ b/.github/workflows/test_data_access_notebooks.yml @@ -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 @@ -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/ diff --git a/.github/workflows/test_data_analysis_and_visualization_notebooks.yml b/.github/workflows/test_data_analysis_and_visualization_notebooks.yml index ed9ffcb5..09355fa7 100644 --- a/.github/workflows/test_data_analysis_and_visualization_notebooks.yml +++ b/.github/workflows/test_data_analysis_and_visualization_notebooks.yml @@ -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 @@ -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/ diff --git a/.github/workflows/test_data_management_notebooks.yml b/.github/workflows/test_data_management_notebooks.yml index 19551247..7bcea188 100644 --- a/.github/workflows/test_data_management_notebooks.yml +++ b/.github/workflows/test_data_management_notebooks.yml @@ -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