Skip to content

Commit 10ef70a

Browse files
committed
fix: Get scripts in prod state
1 parent 5234882 commit 10ef70a

4 files changed

Lines changed: 25 additions & 236 deletions

File tree

.github/scripts/deploy-app-engine.sh

Lines changed: 0 additions & 47 deletions
This file was deleted.

.github/workflows/deploy-production.old

Lines changed: 0 additions & 166 deletions
This file was deleted.

.github/workflows/deploy-production-new.yml renamed to .github/workflows/deploy-production.yml

Lines changed: 20 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,15 @@
11
name: 'Deployment step 2: Deploy to Production test'
22

33
on:
4-
pull_request:
4+
push:
55
branches:
66
- main
7-
# push:
8-
# branches:
9-
# - main
107

118
env:
129
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
1310
PROJECT_ID: policyengine-household-api
1411
REGION: us-central1
15-
SERVICE_NAME: policyengine-household-api
12+
SERVICE_NAME: default
1613
IMAGE_NAME: us-central1-docker.pkg.dev/policyengine-household-api/policyengine-household-api/policyengine-household-api
1714
PYTHON_VERSION: '3.12'
1815
IMAGE_VERSION: python312-latest # Cannot use . in Artifact Registry versions
@@ -21,9 +18,9 @@ jobs:
2118
lint-and-test:
2219
name: Lint and test
2320
runs-on: ubuntu-latest
24-
# if: |
25-
# (github.repository == 'PolicyEngine/policyengine-household-api')
26-
# && (github.event.head_commit.message == 'Update PolicyEngine Household API')
21+
if: |
22+
(github.repository == 'PolicyEngine/policyengine-household-api')
23+
&& (github.event.head_commit.message == 'Update PolicyEngine Household API')
2724
steps:
2825
- name: Checkout code
2926
uses: actions/checkout@v4
@@ -60,10 +57,10 @@ jobs:
6057
build-docker:
6158
name: Build Docker image
6259
runs-on: ubuntu-latest
63-
# if: |
64-
# (github.repository == 'PolicyEngine/policyengine-household-api')
65-
# && (github.event.head_commit.message == 'Update PolicyEngine Household API')
66-
# needs: [lint-and-test]
60+
if: |
61+
(github.repository == 'PolicyEngine/policyengine-household-api')
62+
&& (github.event.head_commit.message == 'Update PolicyEngine Household API')
63+
needs: [lint-and-test]
6764
steps:
6865
- name: Checkout code
6966
uses: actions/checkout@v4
@@ -123,11 +120,10 @@ jobs:
123120
deploy:
124121
name: Deploy to App Engine
125122
runs-on: ubuntu-latest
126-
# if: |
127-
# (github.repository == 'PolicyEngine/policyengine-household-api')
128-
# && (github.event.head_commit.message == 'Update PolicyEngine Household API')
129-
# needs: [lint-and-test, build-docker]
130-
# needs: [build-docker]
123+
if: |
124+
(github.repository == 'PolicyEngine/policyengine-household-api')
125+
&& (github.event.head_commit.message == 'Update PolicyEngine Household API')
126+
needs: [lint-and-test, build-docker]
131127
steps:
132128
- name: Checkout code
133129
uses: actions/checkout@v4
@@ -137,7 +133,8 @@ jobs:
137133
with:
138134
credentials_json: ${{ secrets.GCP_SA_KEY }}
139135

140-
- name: Deploy to App Engine
136+
- id: deploy
137+
name: Deploy to App Engine
141138
uses: google-github-actions/deploy-appengine@v2
142139
with:
143140
deliverables: "./gcp/policyengine_household_api/app.yaml"
@@ -152,8 +149,8 @@ jobs:
152149
USER_ANALYTICS_DB_CONNECTION_NAME=${{ secrets.USER_ANALYTICS_DB_CONNECTION_NAME }}
153150
ANTHROPIC_API_KEY=${{ secrets.ANTHROPIC_API_KEY }}
154151
155-
# - name: Set traffic to new version
156-
# env:
157-
# SERVICE_NAME: ${{ env.SERVICE_NAME }}
158-
# VERSION: ${{ env.IMAGE_VERSION }}
159-
# run: .github/scripts/set-traffic.sh
152+
- name: Set traffic to new version
153+
env:
154+
SERVICE_NAME: ${{ env.SERVICE_NAME }}
155+
VERSION: ${{ steps.deploy.outputs.version }}
156+
run: .github/scripts/set-traffic.sh

changelog_entry.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
- bump: patch
2+
changes:
3+
changed:
4+
- Replaced custom GCP deploy script with official Google action.
5+
- Re-enabled itemized deductions to prevent UK service outage.

0 commit comments

Comments
 (0)