From 7880d7192497dc4120b12189559922e42a311f42 Mon Sep 17 00:00:00 2001 From: Carsten Ehbrecht Date: Fri, 6 Dec 2024 19:58:29 +0100 Subject: [PATCH] added workflow --- .github/workflows/main.yml | 47 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..649eaa8 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,47 @@ +name: build ⚙️ + +on: + push: + branches: + - master + pull_request: + +concurrency: + # For a given workflow, if we push to the same branch, cancel all previous builds on that branch except on master. + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ github.ref != 'refs/heads/master' }} + +permissions: + contents: read + +jobs: + + docs: + name: Docs (Python${{ matrix.python-version }}) + runs-on: ubuntu-latest + strategy: + matrix: + python-version: + - "3.10" + defaults: + run: + shell: bash -l {0} + steps: + - name: Checkout Repository + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + - name: Install packages + run: | + sudo apt-get -y install pandoc graphviz + - name: Setup Conda (Micromamba) with Python${{ matrix.python-version }} + uses: mamba-org/setup-micromamba@f8b8a1e23a26f60a44c853292711bacfd3eac822 # v1.9.0 + with: + cache-downloads: true + cache-environment: true + environment-file: environment.yml + create-args: >- + python=${{ matrix.python-version }} + micromamba-version: 1.5.10-0 # Pin micromamba version because of following issue: https://github.com/mamba-org/setup-micromamba/issues/225 + - name: Build Docs 📚 + run: | + make docs +