From a276e911b594cd722e5f980acca2efd041c740b2 Mon Sep 17 00:00:00 2001 From: Imane LAFNOUNE Date: Sun, 2 Feb 2025 16:47:02 +0100 Subject: [PATCH] test: ci --- .github/workflows/sync_db.yaml | 40 ++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/sync_db.yaml diff --git a/.github/workflows/sync_db.yaml b/.github/workflows/sync_db.yaml new file mode 100644 index 00000000..3349a2ad --- /dev/null +++ b/.github/workflows/sync_db.yaml @@ -0,0 +1,40 @@ +name: Sync DB to S3 + +on: + push: + branches: + - test # to remove + - main + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +env: + ENV: prod + +jobs: + sync_prod_database: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Install a specific version of uv + uses: astral-sh/setup-uv@v5 + with: + version: ">=0.4.0" + + - name: Install dependencies + run: uv sync + + - name: Download production database from Storage + run: | + uv run pipelines/run.py run download_prod_database + + - name: Update production database + run: | + uv run pipelines/run.py run build_database + + - name: Upload production database to Storage + run: | + uv run pipelines/run.py run upload_prod_database