Skip to content

Commit ceb7df5

Browse files
committed
Moves bundle script into GHA CI step
1 parent b73615e commit ceb7df5

3 files changed

Lines changed: 14 additions & 54 deletions

File tree

.github/workflows/ci.yml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,25 @@ jobs:
4343
- name: Test
4444
run: bun test
4545

46+
- name: Build application
47+
working-directory: src/apps/backend
48+
run: bun run build:placeholder
49+
4650
- name: Build and synth CDK
4751
working-directory: cdk
4852
run: |
4953
bun lint
5054
bun test
5155
bun synth
5256
53-
- name: Bundle assets
54-
run: bun build:lambda
57+
- name: Combine application and CDK into dist
58+
run: |
59+
mkdir -p dist/frontend
60+
cp -v src/apps/backend/dist/handler.js dist/
61+
cp -v src/apps/backend/placeholder-assets/index.html dist/frontend
62+
cd dist
63+
zip -r dispatch.zip .
64+
5565
- name: Upload to riff-raff
5666
uses: guardian/actions-riff-raff@ab360a150e2540439f7f675c37d170a2fd6c8604
5767
with:
@@ -63,4 +73,4 @@ jobs:
6373
cdk.out:
6474
- cdk/cdk.out
6575
dispatch:
66-
- dist
76+
- dist/dispatch.zip

build_lambda_resources.sh

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

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@
3030
"format:check": "prettier --check .",
3131
"typecheck": "bun run --filter '*' typecheck",
3232
"docker:compose:up": "docker compose -f docker/docker-compose.local.yml up -d",
33-
"docker:compose:down": "docker compose -f docker/docker-compose.local.yml down",
34-
"build:lambda": "bash ./build_lambda_resources.sh"
33+
"docker:compose:down": "docker compose -f docker/docker-compose.local.yml down"
3534
},
3635
"devDependencies": {
3736
"@guardian/eslint-config": "16.0.0",

0 commit comments

Comments
 (0)