diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml new file mode 100644 index 0000000..2a9ad9c --- /dev/null +++ b/.gitea/workflows/deploy.yml @@ -0,0 +1,31 @@ +name: Deploy Prefect Flows + +on: + push: + branches: [main] + paths: + - 'flows/**' + - 'deploy.py' + workflow_dispatch: + +jobs: + deploy: + runs-on: docker + container: + image: python:3.12-slim + steps: + - name: Install dependencies + run: | + apt-get update && apt-get install -y git + pip install --no-cache-dir prefect prefect-aws + + - name: Checkout repository + run: | + git clone --depth 1 https://gitea.arnodo.fr/${{ gitea.repository }}.git . + git checkout ${{ gitea.sha }} + + - name: Deploy flows to Prefect + env: + PREFECT_API_URL: ${{ secrets.PREFECT_API_URL }} + run: | + python deploy.py