ci: add workflow for automatic deployment
This commit is contained in:
31
.gitea/workflows/deploy.yml
Normal file
31
.gitea/workflows/deploy.yml
Normal file
@@ -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
|
||||||
Reference in New Issue
Block a user