Skip to content

Commit 5692cf3

Browse files
committed
πŸ› fix(ci): update api env variable + add no chache to aws s3/cloudfront
1 parent ff47a36 commit 5692cf3

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

β€Ž.github/workflows/ci-cd.ymlβ€Ž

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,14 +93,20 @@ jobs:
9393
cd ${{ matrix.package }}
9494
npm run build:version
9595
96+
- name: Get client package version
97+
if: matrix.package == 'client'
98+
id: set_client_version
99+
run: |
100+
echo "client_version=$(jq -r .version client/package.json)" >> $GITHUB_OUTPUT
101+
96102
- name: πŸ—οΈ Build Client
97103
if: matrix.package == 'client'
98104
env:
99105
NODE_ENV: production
100106
EXPO_PUBLIC_SUPABASE_URL: ${{ secrets.EXPO_PUBLIC_SUPABASE_URL }}
101107
EXPO_PUBLIC_SUPABASE_ANON_KEY: ${{ secrets.EXPO_PUBLIC_SUPABASE_ANON_KEY }}
102-
EXPO_PUBLIC_API_URL: http://56.228.14.41/api
103-
EXPO_PUBLIC_APP_VERSION: ${{ github.ref_name }}
108+
EXPO_PUBLIC_API_URL: http://56.228.14.41/
109+
EXPO_PUBLIC_APP_VERSION: ${{ steps.set_client_version.outputs.client_version }}
104110
EXPO_PUBLIC_BUILD_NUMBER: ${{ github.run_number }}
105111
EXPO_PUBLIC_BUILD_DATE: ${{ github.run_started_at }}
106112
EXPO_PUBLIC_COMMIT_HASH: ${{ github.sha }}
@@ -227,8 +233,8 @@ jobs:
227233
- name: 🌐 Deploy Client to S3
228234
run: |
229235
if [ -d "./artifacts/client-build/web/dist" ]; then
230-
aws s3 sync ./artifacts/client-build/web/dist/ s3://${{ secrets.S3_BUCKET }} --delete
231-
echo "βœ… Client deployed to S3"
236+
aws s3 sync ./artifacts/client-build/web/dist/ s3://${{ secrets.S3_BUCKET }} --delete --cache-control "no-cache, no-store, must-revalidate"
237+
echo "βœ… Client deployed to S3 with no-cache headers"
232238
else
233239
echo "❌ Client build not found"
234240
fi

0 commit comments

Comments
Β (0)