forked from dataforgoodfr/13_pollution_eau
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Imane LAFNOUNE
committed
Feb 2, 2025
1 parent
83d54bd
commit a276e91
Showing
1 changed file
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |