Skip to content

Commit

Permalink
Merge pull request #3 from hgloeckner/add_build
Browse files Browse the repository at this point in the history
add automatic build (and hopefully deploy)
  • Loading branch information
hgloeckner authored Aug 24, 2024
2 parents 5c4af3e + 0173a2d commit d2de54a
Show file tree
Hide file tree
Showing 50 changed files with 76 additions and 2,199 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/build_and_deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: build_and_deploy

on: [push, pull_request, workflow_dispatch]

permissions:
contents: write

jobs:
docs:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v4
- name: initialize conda
uses: conda-incubator/setup-miniconda@v3
with:
activate-environment: pydropsonde_env
auto-activate-base: false
use-mamba: true
miniforge-variant: Mambaforge
miniforge-version: latest
- name: install conda environment
run:
mamba env update -n pydropsonde_env -f environment.yaml
- name: Sphinx build
run:
sphinx-build -W docs/source docs/_build --keep-going
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
with:
publish_branch: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: _build/
force_orphan: true
9 changes: 3 additions & 6 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# This workflow will install Python dependencies using mamba, run tests and check pre-commit
## This workflow will install Python dependencies using mamba, run tests and check pre-commit

name: Python package

on: [push, pull_request]

jobs:
build:
test:

runs-on: ubuntu-latest
strategy:
Expand All @@ -23,13 +23,10 @@ jobs:
init-shell: bash
generate-run-shell: true
environment-name: testenv
environment-file: environment.yml
environment-file: environment.yaml
- name: pre-commit
uses: pre-commit/action@v3.0.0
- name: Run pytest in micromamba environment
run: |
micromamba install -n testenv pytest
micromamba run -n testenv pytest --import-mode=importlib .
- name: Build docs
run: |
micromamba run -n testenv sphinx-build -n -b html docs/source/ docs/build/
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ halodrops_env/

# Sphinx documentation
docs/build/

**/_autosummary
**/_build
# Visual Studio Code
.vscode/*

Expand Down
160 changes: 0 additions & 160 deletions docs/source/CONTRIBUTING.md

This file was deleted.

8 changes: 8 additions & 0 deletions docs/source/api.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
API
===

.. autosummary::
:toctree: _autosummary
:recursive:

pydropsonde
18 changes: 0 additions & 18 deletions docs/source/apidocs/halodrops/halodrops.helper.md

This file was deleted.

84 changes: 0 additions & 84 deletions docs/source/apidocs/halodrops/halodrops.helper.paths.md

This file was deleted.

Loading

0 comments on commit d2de54a

Please sign in to comment.