Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
savente93 committed Aug 9, 2023
1 parent e8d5e09 commit 1ab7edc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 22 deletions.
15 changes: 2 additions & 13 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,7 @@
---
name: Build Documentation

# We don't want pushes (or PRs) to gh-pages to kick anything off
on:
push:
branches: [main]
paths:
- tests/*
- hydromt/*
- data/*
- docs/*
- examples/*
- pyproject.toml
pull_request:
branches: [main]
paths:
Expand All @@ -23,7 +13,6 @@ on:
- pyproject.toml

jobs:
# Build docs on Linux
Docs:
name: linux docs
runs-on: ubuntu-latest
Expand Down Expand Up @@ -56,7 +45,7 @@ jobs:
- uses: actions/cache@v2
with:
path: /usr/share/miniconda3/envs/hydromt
key: ${{ matrix.python-version }}-conda-${{ hashFiles('environment.yml') }}-${{ env.DATE }}-${{ env.CACHE_NUMBER }}
key: docs-conda-${{ hashFiles('environment.yml') }}-${{ env.DATE }}
id: cache

- name: Update environment
Expand All @@ -74,7 +63,7 @@ jobs:
run: echo "DOC_VERSION=$(python -c 'from hydromt import __version__ as v; print("dev" if "dev" in v else "v"+v.replace(".dev",""))')" >> $GITHUB_ENV

- name: Upload to GitHub Pages
if: ${{ github.event_name != 'pull_request' && !github.event.act }}
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.merged == true && !github.event.act }}
uses: peaceiris/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
13 changes: 4 additions & 9 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,8 @@ on:
schedule:
- cron: '0 0 * * *'

env:
CACHE_NUMBER: 0 # increase to reset cache manually

jobs:
build:

defaults:
run:
shell: bash -l {0}
Expand All @@ -27,6 +23,9 @@ jobs:
python-version: ['3.9','3.10','3.11']
name: py ${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
concurrency:
group: ${{ github.workflow }}-${{ matrix.python-version }}-${{ github.ref }}
cancel-in-progress: true
steps:
- uses: actions/checkout@v3

Expand All @@ -48,7 +47,7 @@ jobs:
- uses: actions/cache@v2
with:
path: /usr/share/miniconda3/envs/hydromt
key: ${{ matrix.python-version }}-conda-${{ hashFiles('environment.yml') }}-${{ env.DATE }}-${{ env.CACHE_NUMBER }}
key: ${{ matrix.python-version }}-conda-${{ hashFiles('environment.yml') }}-${{ env.DATE }}
id: cache

- name: Update environment
Expand All @@ -62,7 +61,3 @@ jobs:
- name: Upload code coverage
if: github.event_name != 'schedule'
uses: codecov/codecov-action@v3

# concurrency:
# group: ${{ github.workflow }}-${{ github.ref }}
# cancel-in-progress: true

0 comments on commit 1ab7edc

Please sign in to comment.