Skip to content

Commit

Permalink
Merge pull request #126 from voto-ocean-knowledge/ci
Browse files Browse the repository at this point in the history
CI trigger only on changes to python files
  • Loading branch information
callumrollo authored Nov 18, 2024
2 parents 9336b48 + eb2561b commit b3a534c
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 46 deletions.
18 changes: 5 additions & 13 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
name: Documentation
name: Test documentation build

on:
pull_request:
push:
branches:
- main
paths:
- '**.py'
- '**.ipynb'
- '**.rst'

jobs:
build-docs:
Expand Down Expand Up @@ -42,12 +43,3 @@ jobs:
pushd docs
make clean html
popd
- name: Deploy
if: success() && github.event.pull_request.merged == true
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/build/html


51 changes: 51 additions & 0 deletions .github/workflows/docs_deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Deploy Documentation

on:
push:
branches:
- main

jobs:
build-docs:
runs-on: ubuntu-latest
permissions:
contents: write

steps:
- name: checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Micromamba ${{ matrix.python-version }}
uses: mamba-org/[email protected]
with:
environment-name: TEST
init-shell: bash
create-args: >-
python=3 pip
--file requirements-dev.txt
--channel conda-forge
- name: Install glidertest
shell: bash -l {0}
run: |
python -m pip install -e . --no-deps --force-reinstall
- name: Build documentation
shell: bash -l {0}
run: |
set -e
jupyter nbconvert --to notebook --execute notebooks/demo.ipynb --output=demo-output.ipynb
mv notebooks/*output.ipynb docs/source/
pushd docs
make clean html
popd
- name: Deploy
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/build/html


33 changes: 0 additions & 33 deletions .github/workflows/experiment.yml

This file was deleted.

3 changes: 3 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ name: Tests

on:
pull_request:
paths:
- '**.py'
- '**.ipynb'


jobs:
Expand Down

0 comments on commit b3a534c

Please sign in to comment.