Skip to content

Commit cd0efd7

Browse files
committed
try and fix deployment
1 parent aac6376 commit cd0efd7

File tree

1 file changed

+23
-3
lines changed

1 file changed

+23
-3
lines changed

.github/workflows/deploy-frontendsupport.yml

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ jobs:
2121
steps:
2222
- uses: actions/checkout@v4
2323

24+
- name: Check AWS env vars present
25+
run: |
26+
echo "AWS_ACCESS_KEY_ID set? $([ -n "${AWS_ACCESS_KEY_ID}" ] && echo yes || echo no) (len=${#AWS_ACCESS_KEY_ID})"
27+
echo "AWS_SECRET_ACCESS_KEY set? $([ -n "${AWS_SECRET_ACCESS_KEY}" ] && echo yes || echo no) (len=${#AWS_SECRET_ACCESS_KEY})"
28+
2429
- name: Setup Node.js
2530
uses: actions/setup-node@v4
2631
with:
@@ -42,13 +47,28 @@ jobs:
4247
- name: Build
4348
run: pnpm build
4449

45-
- name: Deploy to App Runner
50+
- name: Configure AWS credentials
51+
uses: aws-actions/configure-aws-credentials@v4
52+
with:
53+
aws-region: us-east-1
54+
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
55+
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
56+
57+
- name: Deploy (inline deploy:web)
4658
env:
4759
DOCKER_DEFAULT_PLATFORM: linux/amd64
4860
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
4961
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
5062
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
5163
AWS_DEFAULT_REGION: us-east-1
64+
NODE_ENV: production
5265
run: |
53-
echo "Deploying to App Runner"
54-
pnpm --filter @cutting/frontend-support deploy:web
66+
cd apps/frontendsupport
67+
rm -rf pruned
68+
pnpm --filter @cutting/frontend-support build
69+
pnpm --filter @cutting/frontend-support --prod deploy pruned
70+
docker build --build-arg CPPFLAGS="-DPNG_ARM_NEON_OPT=0" -t frontendsupport:latest -f Dockerfile .
71+
aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin 313095418189.dkr.ecr.us-east-1.amazonaws.com
72+
docker tag frontendsupport:latest 313095418189.dkr.ecr.us-east-1.amazonaws.com/frontendsupport:latest
73+
docker push 313095418189.dkr.ecr.us-east-1.amazonaws.com/frontendsupport:latest
74+
rm -rf ./pruned

0 commit comments

Comments
 (0)