Files
pyzebra/.gitea/workflows/deploy.yaml
T
usov_i 53a7c3e6a1
pyzebra CI/CD pipeline / test-env (push) Successful in 2m44s
pyzebra CI/CD pipeline / prod-env (push) Skipped
pyzebra CI/CD pipeline / cleanup (push) Successful in 4s
Install spind deps on redeploy
2026-09-02 09:40:49 +02:00

49 lines
1.6 KiB
YAML

name: pyzebra CI/CD pipeline
on:
push:
branches:
- main
tags:
- '*'
env:
CONDA: /opt/miniforge3
jobs:
test-env:
runs-on: pyzebra
if: github.ref == 'refs/heads/main'
env:
BUILD_DIR: ${{ runner.temp }}/conda_build
steps:
- name: Checkout repository
uses: actions/checkout@v4
- run: $CONDA/bin/conda build --no-anaconda-upload --output-folder $BUILD_DIR ./conda-recipe
- run: $CONDA/bin/conda remove --yes --quiet --name test --all --keep-env
- run: $CONDA/bin/conda install --yes --quiet --name test --channel $BUILD_DIR python=3.10 pyzebra
- run: $CONDA/bin/conda install --yes --quiet --name test mpi4py docopt # spind dependencies
- run: sudo systemctl restart pyzebra-test.service
prod-env:
runs-on: pyzebra
if: startsWith(github.ref, 'refs/tags/')
env:
BUILD_DIR: ${{ runner.temp }}/conda_build
steps:
- name: Checkout repository
uses: actions/checkout@v4
- run: $CONDA/bin/conda build --token ${{ secrets.ANACONDA_TOKEN }} --output-folder $BUILD_DIR ./conda-recipe
- run: $CONDA/bin/conda remove --yes --quiet --name prod --all --keep-env
- run: $CONDA/bin/conda install --yes --quiet --name prod --channel $BUILD_DIR python=3.10 pyzebra
- run: $CONDA/bin/conda install --yes --quiet --name prod mpi4py docopt # spind dependencies
- run: sudo systemctl restart pyzebra-prod.service
cleanup:
runs-on: pyzebra
needs: [test-env, prod-env]
if: always()
steps:
- run: $CONDA/bin/conda build purge-all
- run: $CONDA/bin/conda clean --yes --all