Skip to content

Commit e64d6c8

Browse files
committed
feat: add refresh step for materialized views in production and staging workflows
1 parent 75f727d commit e64d6c8

2 files changed

Lines changed: 20 additions & 0 deletions

File tree

.github/workflows/CD_production.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,16 @@ jobs:
4747
run: |
4848
uv run alembic upgrade head
4949
50+
- name: Refresh materialized views on production database
51+
env:
52+
DB_DRIVER: "cloudsql"
53+
CLOUD_SQL_INSTANCE_NAME: "${{ secrets.CLOUD_SQL_INSTANCE_NAME }}"
54+
CLOUD_SQL_DATABASE: "${{ vars.CLOUD_SQL_DATABASE }}"
55+
CLOUD_SQL_USER: "${{ secrets.CLOUD_SQL_USER }}"
56+
CLOUD_SQL_IAM_AUTH: true
57+
run: |
58+
uv run python -m cli.cli refresh-pygeoapi-materialized-views
59+
5060
- name: Ensure envsubst is available
5161
run: |
5262
if ! command -v envsubst >/dev/null 2>&1; then

.github/workflows/CD_staging.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,16 @@ jobs:
4747
run: |
4848
uv run alembic upgrade head
4949
50+
- name: Refresh materialized views on staging database
51+
env:
52+
DB_DRIVER: "cloudsql"
53+
CLOUD_SQL_INSTANCE_NAME: "${{ secrets.CLOUD_SQL_INSTANCE_NAME }}"
54+
CLOUD_SQL_DATABASE: "${{ vars.CLOUD_SQL_DATABASE }}"
55+
CLOUD_SQL_USER: "${{ secrets.CLOUD_SQL_USER }}"
56+
CLOUD_SQL_IAM_AUTH: true
57+
run: |
58+
uv run python -m cli.cli refresh-pygeoapi-materialized-views
59+
5060
- name: Ensure envsubst is available
5161
run: |
5262
if ! command -v envsubst >/dev/null 2>&1; then

0 commit comments

Comments
 (0)