Skip to content

Commit 52ce92e

Browse files
committed
fix(tf): upgrading terraform
1 parent e479ae0 commit 52ce92e

File tree

2 files changed

+23
-13
lines changed

2 files changed

+23
-13
lines changed

.github/workflows/build-app.yml

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ jobs:
7272
id: web-docker-build
7373
uses: pocket/pocket-monorepo/.github/actions/containerize@main
7474
with:
75-
docker-repo-name: "410318598490.dkr.ecr.us-east-1.amazonaws.com/webclient-prod-app"
75+
docker-repo-name: "410318598490.dkr.ecr.us-east-1.amazonaws.com/webclient-dev-app"
7676
push: true
7777
app-path: ''
7878
app-port: 80
@@ -94,7 +94,7 @@ jobs:
9494
id: pocket-docker-build
9595
uses: pocket/pocket-monorepo/.github/actions/containerize@main
9696
with:
97-
docker-repo-name: "410318598490.dkr.ecr.us-east-1.amazonaws.com/pocketclient-prod-app"
97+
docker-repo-name: "410318598490.dkr.ecr.us-east-1.amazonaws.com/pocketclient-dev-app"
9898
push: true
9999
app-path: ''
100100
app-port: 80
@@ -145,14 +145,6 @@ jobs:
145145
scope: 'web'
146146
sentry-project: ''
147147
sentry-token: ${{secrets.SENTRY_BEARER}}
148-
- name: Code Deploy Web Docker Image
149-
uses: pocket/pocket-monorepo/.github/actions/ecs-codedeploy@main
150-
if: fromJSON(inputs.web-client-terraform-output).ecs-task-containerName.value != ''
151-
with:
152-
docker-image-name: ${{steps.web-docker-build.outputs.docker-image-name}}
153-
terraform-output: ${{ inputs.web-client-terraform-output }}
154-
name: 'web'
155-
156148
- name: Build Pocket Client
157149
id: pocket-docker-build
158150
uses: pocket/pocket-monorepo/.github/actions/containerize@main
@@ -167,6 +159,24 @@ jobs:
167159
scope: 'pocket'
168160
sentry-project: ''
169161
sentry-token: ${{secrets.SENTRY_BEARER}}
162+
- name: Push Production Assets
163+
shell: bash
164+
run: |
165+
aws s3 cp \
166+
--recursive \
167+
--acl public-read \
168+
--metadata-directive REPLACE \
169+
--cache-control max-age=31536000 \
170+
--include "*" \
171+
--exclude "BUILD_ID" \
172+
clients/web/.next s3://readitlater-deploy/web-client/_next
173+
- name: Code Deploy Web Docker Image
174+
uses: pocket/pocket-monorepo/.github/actions/ecs-codedeploy@main
175+
if: fromJSON(inputs.web-client-terraform-output).ecs-task-containerName.value != ''
176+
with:
177+
docker-image-name: ${{steps.web-docker-build.outputs.docker-image-name}}
178+
terraform-output: ${{ inputs.web-client-terraform-output }}
179+
name: 'web'
170180
- name: Code Deploy Pocket Docker Image
171181
uses: pocket/pocket-monorepo/.github/actions/ecs-codedeploy@main
172182
if: fromJSON(inputs.pocket-client-terraform-output).ecs-task-containerName.value != ''

.github/workflows/deployment.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Pull Request
1+
name: Deployment
22
on:
33
push:
44
branches:
@@ -11,14 +11,14 @@ jobs:
1111
uses: pocket/pocket-monorepo/.github/workflows/reuse-infrastructure.yml@main
1212
with:
1313
scope: pocket-client-cdk
14-
stack-output-path: infrastructure/pocket-client-cdk/cdktf.out/stacks/pocket-client-cdk
14+
stack-output-path: infrastructure/pocket/cdktf.out/stacks/pocket-client
1515
secrets: inherit
1616

1717
web-client-infrastructure:
1818
uses: pocket/pocket-monorepo/.github/workflows/reuse-infrastructure.yml@main
1919
with:
2020
scope: web-client-cdk
21-
stack-output-path: infrastructure/web-client-cdk/cdktf.out/stacks/web-client-cdk
21+
stack-output-path: infrastructure/web/cdktf.out/stacks/web-client
2222
secrets: inherit
2323

2424
# we are building on branch to make sure there are no build errors

0 commit comments

Comments
 (0)