-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
All 1.1 #129
base: all-1.0
Are you sure you want to change the base?
All 1.1 #129
Changes from all commits
e85029f
8c1a41a
1edf0c3
3f0ac66
4a40c80
9920bf2
cbf15d0
03981ea
4d189e4
7865bb6
2371510
866dbb4
9cec0dd
f50d3d8
fb1d764
57147a8
8c212e1
cfd87d7
a0f199a
381f682
355bc2f
315a1d6
c4f879b
ae0d87a
484cf5b
0ccbe21
ff9c4f4
8ba0465
6e9d60b
078d117
fa61f14
68421e0
aab9014
57c83aa
8b90b62
4aa67b5
bb64908
c42ed14
abc1ff9
451b846
5d740f7
116aeab
00547fe
e1d9424
fcf254e
0df8ee0
2f148ea
b725445
8ccc32e
f017b9c
5b102cd
2550c20
3457ab0
5e4fec2
f338471
c81c6a1
ea39674
4e93d8a
8bf9138
8e27d15
93c8085
a1b9acc
b8d35d8
2d28e2e
e29a525
a4a9b60
3a37f29
629f23a
ef37c57
d711c82
3301d54
710f8b7
a0ec751
b9f9d84
13e864c
d50ff86
83aeaaa
88d9b3f
b6f7e9c
6d49200
f70d3be
b1d78ef
e52538e
397c71d
3834821
a362815
6eba688
3c8b70d
dd6bff5
f1ec586
72d14e6
d044a07
ddf8b77
1debefb
23f85e3
a9c63ae
8ac3373
8365fc7
b3762d5
7161c14
ba0a15b
4eaa56d
9bde645
54b7e05
28227cc
c743c6d
bd0eb79
f96b26b
b7b0888
fde9fb9
fbad447
37410df
eb232c6
fd1c808
33af7e4
f60fa1b
79be4f6
d717315
de8c35b
b0812a3
add473d
23f894e
b6c421b
9b0a0a1
e0e209d
3ac4d49
cd81a9e
e26dbff
5f714b4
194dd50
9c611d3
44e43e3
e8c56a7
f405c18
66aec69
933fd5f
a693625
2fd4db1
f4ab199
870e270
bb984f0
c77d531
4af5ad0
9c8d30b
96114aa
18d9bb9
d91ee92
bb7c1ec
6e3bdda
04c9989
49e768a
05c4ef9
8c65fd0
96689fb
e063b00
086deb1
0a76543
e5f57f5
1613498
d5e75a1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,97 @@ | ||||||||||||||||||||||
name: ALL sandbox prod Deployment | ||||||||||||||||||||||
|
||||||||||||||||||||||
on: | ||||||||||||||||||||||
push: | ||||||||||||||||||||||
branches: | ||||||||||||||||||||||
- all-1.1-appliance-prod | ||||||||||||||||||||||
|
||||||||||||||||||||||
jobs: | ||||||||||||||||||||||
deploy: | ||||||||||||||||||||||
runs-on: ubuntu-latest | ||||||||||||||||||||||
environment: all-app-sandbox | ||||||||||||||||||||||
|
||||||||||||||||||||||
steps: | ||||||||||||||||||||||
- name: Checkout code | ||||||||||||||||||||||
uses: actions/checkout@v2 | ||||||||||||||||||||||
|
||||||||||||||||||||||
- name: Setup Node.js | ||||||||||||||||||||||
uses: actions/setup-node@v3 | ||||||||||||||||||||||
with: | ||||||||||||||||||||||
node-version: '18' | ||||||||||||||||||||||
|
||||||||||||||||||||||
- name: Install AWS CLI | ||||||||||||||||||||||
run: | | ||||||||||||||||||||||
sudo DEBIAN_FRONTEND=noninteractive apt-get update | ||||||||||||||||||||||
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y awscli | ||||||||||||||||||||||
|
||||||||||||||||||||||
- name: Configure AWS credentials | ||||||||||||||||||||||
run: | | ||||||||||||||||||||||
aws configure set aws_access_key_id ${{ secrets.AWS_ACCESS_KEY_ID }} | ||||||||||||||||||||||
aws configure set aws_secret_access_key ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||||||||||||||||||||||
aws configure set default.region ${{ secrets.AWS_REGION }} | ||||||||||||||||||||||
|
||||||||||||||||||||||
- name: Clean up node_modules and package-lock.json | ||||||||||||||||||||||
run: | | ||||||||||||||||||||||
rm -rf node_modules | ||||||||||||||||||||||
rm -f package-lock.json | ||||||||||||||||||||||
|
||||||||||||||||||||||
- name: Install Dependencies | ||||||||||||||||||||||
run: npm install --legacy-peer-deps | ||||||||||||||||||||||
|
||||||||||||||||||||||
- name: Run Husky Install | ||||||||||||||||||||||
run: npm run prepare | ||||||||||||||||||||||
|
||||||||||||||||||||||
- name: Build and Package Application | ||||||||||||||||||||||
env: | ||||||||||||||||||||||
SKIP_PREFLIGHT_CHECK: ${{ vars.SKIP_PREFLIGHT_CHECK }} | ||||||||||||||||||||||
REACT_APP_MODE: ${{ vars.REACT_APP_MODE }} | ||||||||||||||||||||||
REACT_APP_authToken: ${{ vars.REACT_APP_authToken }} | ||||||||||||||||||||||
REACT_APP_PID: ${{ vars.REACT_APP_PID }} | ||||||||||||||||||||||
REACT_APP_UID: ${{ vars.REACT_APP_UID }} | ||||||||||||||||||||||
REACT_APP_ID: ${{ vars.REACT_APP_ID }} | ||||||||||||||||||||||
REACT_APP_VER: ${{ vars.REACT_APP_VER }} | ||||||||||||||||||||||
REACT_APP_TIMEDIFF: ${{ vars.REACT_APP_TIMEDIFF }} | ||||||||||||||||||||||
REACT_APP_HOST: ${{ vars.REACT_APP_HOST }} | ||||||||||||||||||||||
REACT_APP_ENDPOINT: ${{ vars.REACT_APP_ENDPOINT }} | ||||||||||||||||||||||
REACT_APP_APISLUG: ${{ vars.REACT_APP_APISLUG }} | ||||||||||||||||||||||
REACT_APP_CHANNEL: ${{ vars.REACT_APP_CHANNEL }} | ||||||||||||||||||||||
REACT_APP_ENV: ${{ vars.REACT_APP_ENV }} | ||||||||||||||||||||||
REACT_APP_BATCHSIZE: ${{ vars.REACT_APP_BATCHSIZE }} | ||||||||||||||||||||||
REACT_APP_CONTENT_SIZE: ${{ vars.REACT_APP_CONTENT_SIZE }} | ||||||||||||||||||||||
REACT_APP_LANGUAGE: ${{ vars.REACT_APP_LANGUAGE }} | ||||||||||||||||||||||
REACT_APP_TELEMETRY_MODE: ${{ vars.REACT_APP_TELEMETRY_MODE }} | ||||||||||||||||||||||
REACT_APP_VIRTUAL_ID_HOST: ${{ vars.REACT_APP_VIRTUAL_ID_HOST }} | ||||||||||||||||||||||
REACT_APP_LEARNER_AI_ORCHESTRATION_HOST: ${{ vars.REACT_APP_LEARNER_AI_ORCHESTRATION_HOST }} | ||||||||||||||||||||||
REACT_APP_LEARNER_AI_APP_HOST: ${{ vars.REACT_APP_LEARNER_AI_APP_HOST }} | ||||||||||||||||||||||
REACT_APP_CONTENT_SERVICE_APP_HOST: ${{ vars.REACT_APP_CONTENT_SERVICE_APP_HOST }} | ||||||||||||||||||||||
REACT_APP_CAPTURE_AUDIO: ${{ vars.REACT_APP_CAPTURE_AUDIO }} | ||||||||||||||||||||||
REACT_APP_AWS_S3_BUCKET_NAME: ${{ vars.REACT_APP_AWS_S3_BUCKET_NAME }} | ||||||||||||||||||||||
REACT_APP_AWS_S3_BUCKET_URL: ${{ vars.REACT_APP_AWS_S3_BUCKET_URL }} | ||||||||||||||||||||||
REACT_APP_AWS_S3_REGION: ${{ vars.REACT_APP_AWS_S3_REGION }} | ||||||||||||||||||||||
REACT_APP_AWS_S3_BUCKET_CONTENT_URL: ${{ vars.REACT_APP_AWS_S3_BUCKET_CONTENT_URL }} | ||||||||||||||||||||||
REACT_APP_MIN_DECIBELS: ${{ vars.REACT_APP_MIN_DECIBELS }} | ||||||||||||||||||||||
REACT_APP_IS_AUDIOPREPROCESSING: ${{ vars.REACT_APP_IS_AUDIOPREPROCESSING }} | ||||||||||||||||||||||
REACT_APP_POST_LEARNER_PROGRESS: ${{ vars.REACT_APP_POST_LEARNER_PROGRESS }} | ||||||||||||||||||||||
REACT_APP_IS_APP_IFRAME: ${{ vars.REACT_APP_IS_APP_IFRAME }} | ||||||||||||||||||||||
REACT_APP_IS_IN_APP_AUTHORISATION: ${{ vars.REACT_APP_IS_IN_APP_AUTHORISATION }} | ||||||||||||||||||||||
REACT_APP_IS_APP_LANGUAGES: ${{ vars.REACT_APP_IS_APP_LANGUAGES }} | ||||||||||||||||||||||
CI: false # Disabling CI to not treat warnings as errors | ||||||||||||||||||||||
run: npm run build | ||||||||||||||||||||||
|
||||||||||||||||||||||
- name: Deploy to S3 Bucket | ||||||||||||||||||||||
run: aws s3 sync ./build s3://sb-all-appliance/assets/all-app/ | ||||||||||||||||||||||
|
||||||||||||||||||||||
- name: Debug Environment Variables | ||||||||||||||||||||||
run: | | ||||||||||||||||||||||
echo "REACT_APP_AWS_S3_BUCKET_NAME: $REACT_APP_AWS_S3_BUCKET_NAME" | ||||||||||||||||||||||
echo "AWS_REGION: $AWS_REGION" | ||||||||||||||||||||||
echo "secrate": ${{ vars.REACT_APP_AWS_S3_BUCKET_NAME }} | ||||||||||||||||||||||
Comment on lines
+84
to
+88
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove sensitive information from debug logs. Avoid printing sensitive information such as environment variables in the debug logs. - echo "secrate": ${{ vars.REACT_APP_AWS_S3_BUCKET_NAME }}
+ echo "REACT_APP_AWS_S3_BUCKET_NAME: [REDACTED]" Committable suggestion
Suggested change
|
||||||||||||||||||||||
|
||||||||||||||||||||||
- name: Cloudfront Invalidation | ||||||||||||||||||||||
uses: chetan/invalidate-cloudfront-action@master | ||||||||||||||||||||||
env: | ||||||||||||||||||||||
DISTRIBUTION: ${{ secrets.AWS_DISTRIBUTION }} | ||||||||||||||||||||||
PATHS: '/*' | ||||||||||||||||||||||
AWS_REGION: ${{ secrets.AWS_REGION }} | ||||||||||||||||||||||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||||||||||||||||||||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
name: ALL rig dev Deployment | ||
|
||
on: | ||
push: | ||
branches: | ||
- all-1.2.1 | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
environment: all-dev-rig | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '18' | ||
|
||
- name: Install AWS CLI | ||
run: | | ||
sudo DEBIAN_FRONTEND=noninteractive apt-get update | ||
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y awscli | ||
|
||
- name: Configure AWS credentials | ||
run: | | ||
aws configure set aws_access_key_id ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
aws configure set aws_secret_access_key ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
aws configure set default.region ${{ secrets.AWS_REGION }} | ||
|
||
- name: Clean up node_modules and package-lock.json | ||
run: | | ||
rm -rf node_modules | ||
rm -f package-lock.json | ||
|
||
- name: Install Dependencies | ||
run: npm install --legacy-peer-deps | ||
|
||
- name: Run Husky Install | ||
run: npm run prepare | ||
|
||
- name: Build and Package Application | ||
env: | ||
SKIP_PREFLIGHT_CHECK: ${{ vars.SKIP_PREFLIGHT_CHECK }} | ||
REACT_APP_MODE: ${{ vars.REACT_APP_MODE }} | ||
REACT_APP_authToken: ${{ vars.REACT_APP_authToken }} | ||
REACT_APP_PID: ${{ vars.REACT_APP_PID }} | ||
REACT_APP_UID: ${{ vars.REACT_APP_UID }} | ||
REACT_APP_ID: ${{ vars.REACT_APP_ID }} | ||
REACT_APP_VER: ${{ vars.REACT_APP_VER }} | ||
REACT_APP_TIMEDIFF: ${{ vars.REACT_APP_TIMEDIFF }} | ||
REACT_APP_HOST: ${{ vars.REACT_APP_HOST }} | ||
REACT_APP_ENDPOINT: ${{ vars.REACT_APP_ENDPOINT }} | ||
REACT_APP_APISLUG: ${{ vars.REACT_APP_APISLUG }} | ||
REACT_APP_CHANNEL: ${{ vars.REACT_APP_CHANNEL }} | ||
REACT_APP_ENV: ${{ vars.REACT_APP_ENV }} | ||
REACT_APP_BATCHSIZE: ${{ vars.REACT_APP_BATCHSIZE }} | ||
REACT_APP_CONTENT_SIZE: ${{ vars.REACT_APP_CONTENT_SIZE }} | ||
REACT_APP_LANGUAGE: ${{ vars.REACT_APP_LANGUAGE }} | ||
REACT_APP_TELEMETRY_MODE: ${{ vars.REACT_APP_TELEMETRY_MODE }} | ||
REACT_APP_VIRTUAL_ID_HOST: ${{ vars.REACT_APP_VIRTUAL_ID_HOST }} | ||
REACT_APP_LEARNER_AI_ORCHESTRATION_HOST: ${{ vars.REACT_APP_LEARNER_AI_ORCHESTRATION_HOST }} | ||
REACT_APP_LEARNER_AI_APP_HOST: ${{ vars.REACT_APP_LEARNER_AI_APP_HOST }} | ||
REACT_APP_CONTENT_SERVICE_APP_HOST: ${{ vars.REACT_APP_CONTENT_SERVICE_APP_HOST }} | ||
REACT_APP_CAPTURE_AUDIO: ${{ vars.REACT_APP_CAPTURE_AUDIO }} | ||
REACT_APP_AWS_S3_BUCKET_NAME: ${{ vars.REACT_APP_AWS_S3_BUCKET_NAME }} | ||
REACT_APP_AWS_S3_BUCKET_URL: ${{ vars.REACT_APP_AWS_S3_BUCKET_URL }} | ||
REACT_APP_AWS_S3_REGION: ${{ vars.REACT_APP_AWS_S3_REGION }} | ||
REACT_APP_AWS_S3_BUCKET_CONTENT_URL: ${{ vars.REACT_APP_AWS_S3_BUCKET_CONTENT_URL }} | ||
REACT_APP_MIN_DECIBELS: ${{ vars.REACT_APP_MIN_DECIBELS }} | ||
REACT_APP_IS_AUDIOPREPROCESSING: ${{ vars.REACT_APP_IS_AUDIOPREPROCESSING }} | ||
REACT_APP_POST_LEARNER_PROGRESS: ${{ vars.REACT_APP_POST_LEARNER_PROGRESS }} | ||
REACT_APP_IS_APP_IFRAME: ${{ vars.REACT_APP_IS_APP_IFRAME }} | ||
REACT_APP_IS_IN_APP_AUTHORISATION: ${{ vars.REACT_APP_IS_IN_APP_AUTHORISATION }} | ||
REACT_APP_IS_APP_LANGUAGES: ${{ vars.REACT_APP_IS_APP_LANGUAGES }} | ||
CI: false # Disabling CI to not treat warnings as errors | ||
run: npm run build | ||
|
||
- name: Deploy to S3 Bucket | ||
run: aws s3 sync ./build s3://sballappliance/ | ||
|
||
- name: Debug Environment Variables | ||
run: | | ||
echo "REACT_APP_AWS_S3_BUCKET_NAME: $REACT_APP_AWS_S3_BUCKET_NAME" | ||
echo "AWS_REGION: $AWS_REGION" | ||
echo "secrate": ${{ vars.REACT_APP_AWS_S3_BUCKET_NAME }} | ||
|
||
- name: Cloudfront Invalidation | ||
uses: chetan/invalidate-cloudfront-action@master | ||
env: | ||
DISTRIBUTION: ${{ secrets.AWS_DISTRIBUTION }} | ||
PATHS: '/*' | ||
AWS_REGION: ${{ secrets.AWS_REGION }} | ||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
name: ALL tn dev Deployment | ||
|
||
on: | ||
push: | ||
branches: | ||
- test | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
environment: all-dev-rig | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '16' | ||
|
||
- name: Install AWS CLI | ||
run: | | ||
sudo DEBIAN_FRONTEND=noninteractive apt-get update | ||
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y awscli | ||
- name: Configure AWS credentials | ||
run: | | ||
aws configure set aws_access_key_id ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
aws configure set aws_secret_access_key ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
aws configure set default.region ${{ secrets.AWS_REGION }} | ||
- name: Build and Package Application | ||
run: | | ||
npm install | ||
|
||
- name: Build Production | ||
run: | | ||
REACT_APP_API_KEY=${{ secrets.REACT_APP_API_KEY }} \ | ||
REACT_APP_MODE=play \ | ||
REACT_APP_authToken="" \ | ||
REACT_APP_PID=learner-ai-story-demo \ | ||
REACT_APP_UID=anonymous \ | ||
REACT_APP_ID=all.ll.app \ | ||
REACT_APP_VER="0.3.0" \ | ||
REACT_APP_TIMEDIFF="0" \ | ||
REACT_APP_HOST=https://telemetry-dev.theall.ai \ | ||
REACT_APP_ENDPOINT=telemetry \ | ||
REACT_APP_APISLUG="/v1/" \ | ||
REACT_APP_CHANNEL="learner-ai-demo" \ | ||
REACT_APP_ENV="all-player" \ | ||
REACT_APP_BATCHSIZE=1 \ | ||
REACT_APP_CONTENT_SIZE=5 \ | ||
REACT_APP_LANGUAGE=ta \ | ||
REACT_APP_TELEMETRY_MODE=DT \ | ||
REACT_APP_LEARNER_AI_APP_HOST="https://www.learnerai-dev.theall.ai" \ | ||
REACT_APP_CAPTURE_AUDIO=true \ | ||
REACT_APP_AWS_S3_BUCKET_NAME=all-dev-storage \ | ||
REACT_APP_AWS_S3_BUCKET_URL=https://all-dev-storage.s3.ap-south-1.amazonaws.com \ | ||
REACT_APP_AWS_S3_REGION=ap-south-1 \ | ||
REACT_APP_AWS_ACCESS_KEY_ID=${{ secrets.REACT_APP_AWS_ACCESS_KEY_ID }} \ | ||
REACT_APP_AWS_SECRET_ACCESS_KEY=${{ secrets.REACT_APP_AWS_SECRET_ACCESS_KEY }} \ | ||
REACT_APP_AWS_S3_BUCKET_CONTENT_URL=https://all-dev-content-service.s3.ap-south-1.amazonaws.com \ | ||
REACT_APP_MIN_DECIBELS=-75 \ | ||
REACT_APP_IS_AUDIOPREPROCESSING=false \ | ||
npm run build | ||
- name: Deploy to S3 Bucket | ||
run: | | ||
aws s3 sync ./build s3://sballappliance/assets/sb-ai/ | ||
- name: Debug Environment Variables | ||
run: | | ||
echo "REACT_APP_AWS_S3_BUCKET_NAME: $REACT_APP_AWS_S3_BUCKET_NAME" | ||
echo "AWS_REGION: $AWS_REGION" | ||
echo "secrate": ${{secrets.REACT_APP_AWS_S3_BUCKET_NAME}} | ||
### Invalidate Cloudfront | ||
- name: Cloudfront Invalidation | ||
uses: chetan/invalidate-cloudfront-action@master | ||
env: | ||
DISTRIBUTION: ${{ secrets.AWS_DISTRIBUTION }} | ||
PATHS: '/*' | ||
AWS_REGION: ${{ secrets.AWS_REGION }} | ||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} |
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,97 @@ | ||||||||||||||||||||||
name: ALL rig prod Deployment | ||||||||||||||||||||||
|
||||||||||||||||||||||
on: | ||||||||||||||||||||||
push: | ||||||||||||||||||||||
branches: | ||||||||||||||||||||||
- test-rig-1.1-prod | ||||||||||||||||||||||
|
||||||||||||||||||||||
jobs: | ||||||||||||||||||||||
deploy: | ||||||||||||||||||||||
runs-on: ubuntu-latest | ||||||||||||||||||||||
environment: all-prod-rig | ||||||||||||||||||||||
|
||||||||||||||||||||||
steps: | ||||||||||||||||||||||
- name: Checkout code | ||||||||||||||||||||||
uses: actions/checkout@v2 | ||||||||||||||||||||||
|
||||||||||||||||||||||
- name: Setup Node.js | ||||||||||||||||||||||
uses: actions/setup-node@v3 | ||||||||||||||||||||||
with: | ||||||||||||||||||||||
node-version: '18' | ||||||||||||||||||||||
|
||||||||||||||||||||||
- name: Install AWS CLI | ||||||||||||||||||||||
run: | | ||||||||||||||||||||||
sudo DEBIAN_FRONTEND=noninteractive apt-get update | ||||||||||||||||||||||
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y awscli | ||||||||||||||||||||||
Comment on lines
+22
to
+25
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Optimize the AWS CLI installation step. Consider combining the - sudo DEBIAN_FRONTEND=noninteractive apt-get update
- sudo DEBIAN_FRONTEND=noninteractive apt-get install -y awscli
+ sudo DEBIAN_FRONTEND=noninteractive apt-get update && sudo DEBIAN_FRONTEND=noninteractive apt-get install -y awscli Committable suggestion
Suggested change
|
||||||||||||||||||||||
|
||||||||||||||||||||||
- name: Configure AWS credentials | ||||||||||||||||||||||
run: | | ||||||||||||||||||||||
aws configure set aws_access_key_id ${{ secrets.AWS_ACCESS_KEY_ID }} | ||||||||||||||||||||||
aws configure set aws_secret_access_key ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||||||||||||||||||||||
aws configure set default.region ${{ secrets.AWS_REGION }} | ||||||||||||||||||||||
|
||||||||||||||||||||||
- name: Clean up node_modules and package-lock.json | ||||||||||||||||||||||
run: | | ||||||||||||||||||||||
rm -rf node_modules | ||||||||||||||||||||||
rm -f package-lock.json | ||||||||||||||||||||||
|
||||||||||||||||||||||
- name: Install Dependencies | ||||||||||||||||||||||
run: npm install --legacy-peer-deps | ||||||||||||||||||||||
|
||||||||||||||||||||||
- name: Run Husky Install | ||||||||||||||||||||||
run: npm run prepare | ||||||||||||||||||||||
|
||||||||||||||||||||||
- name: Build and Package Application | ||||||||||||||||||||||
env: | ||||||||||||||||||||||
SKIP_PREFLIGHT_CHECK: ${{ vars.SKIP_PREFLIGHT_CHECK }} | ||||||||||||||||||||||
REACT_APP_MODE: ${{ vars.REACT_APP_MODE }} | ||||||||||||||||||||||
REACT_APP_authToken: ${{ vars.REACT_APP_authToken }} | ||||||||||||||||||||||
REACT_APP_PID: ${{ vars.REACT_APP_PID }} | ||||||||||||||||||||||
REACT_APP_UID: ${{ vars.REACT_APP_UID }} | ||||||||||||||||||||||
REACT_APP_ID: ${{ vars.REACT_APP_ID }} | ||||||||||||||||||||||
REACT_APP_VER: ${{ vars.REACT_APP_VER }} | ||||||||||||||||||||||
REACT_APP_TIMEDIFF: ${{ vars.REACT_APP_TIMEDIFF }} | ||||||||||||||||||||||
REACT_APP_HOST: ${{ vars.REACT_APP_HOST }} | ||||||||||||||||||||||
REACT_APP_ENDPOINT: ${{ vars.REACT_APP_ENDPOINT }} | ||||||||||||||||||||||
REACT_APP_APISLUG: ${{ vars.REACT_APP_APISLUG }} | ||||||||||||||||||||||
REACT_APP_CHANNEL: ${{ vars.REACT_APP_CHANNEL }} | ||||||||||||||||||||||
REACT_APP_ENV: ${{ vars.REACT_APP_ENV }} | ||||||||||||||||||||||
REACT_APP_BATCHSIZE: ${{ vars.REACT_APP_BATCHSIZE }} | ||||||||||||||||||||||
REACT_APP_CONTENT_SIZE: ${{ vars.REACT_APP_CONTENT_SIZE }} | ||||||||||||||||||||||
REACT_APP_LANGUAGE: ${{ vars.REACT_APP_LANGUAGE }} | ||||||||||||||||||||||
REACT_APP_TELEMETRY_MODE: ${{ vars.REACT_APP_TELEMETRY_MODE }} | ||||||||||||||||||||||
REACT_APP_VIRTUAL_ID_HOST: ${{ vars.REACT_APP_VIRTUAL_ID_HOST }} | ||||||||||||||||||||||
REACT_APP_LEARNER_AI_ORCHESTRATION_HOST: ${{ vars.REACT_APP_LEARNER_AI_ORCHESTRATION_HOST }} | ||||||||||||||||||||||
REACT_APP_LEARNER_AI_APP_HOST: ${{ vars.REACT_APP_LEARNER_AI_APP_HOST }} | ||||||||||||||||||||||
REACT_APP_CONTENT_SERVICE_APP_HOST: ${{ vars.REACT_APP_CONTENT_SERVICE_APP_HOST }} | ||||||||||||||||||||||
REACT_APP_CAPTURE_AUDIO: ${{ vars.REACT_APP_CAPTURE_AUDIO }} | ||||||||||||||||||||||
REACT_APP_AWS_S3_BUCKET_NAME: ${{ vars.REACT_APP_AWS_S3_BUCKET_NAME }} | ||||||||||||||||||||||
REACT_APP_AWS_S3_BUCKET_URL: ${{ vars.REACT_APP_AWS_S3_BUCKET_URL }} | ||||||||||||||||||||||
REACT_APP_AWS_S3_REGION: ${{ vars.REACT_APP_AWS_S3_REGION }} | ||||||||||||||||||||||
REACT_APP_AWS_S3_BUCKET_CONTENT_URL: ${{ vars.REACT_APP_AWS_S3_BUCKET_CONTENT_URL }} | ||||||||||||||||||||||
REACT_APP_MIN_DECIBELS: ${{ vars.REACT_APP_MIN_DECIBELS }} | ||||||||||||||||||||||
REACT_APP_IS_AUDIOPREPROCESSING: ${{ vars.REACT_APP_IS_AUDIOPREPROCESSING }} | ||||||||||||||||||||||
REACT_APP_POST_LEARNER_PROGRESS: ${{ vars.REACT_APP_POST_LEARNER_PROGRESS }} | ||||||||||||||||||||||
REACT_APP_IS_APP_IFRAME: ${{ vars.REACT_APP_IS_APP_IFRAME }} | ||||||||||||||||||||||
REACT_APP_IS_IN_APP_AUTHORISATION: ${{ vars.REACT_APP_IS_IN_APP_AUTHORISATION }} | ||||||||||||||||||||||
REACT_APP_IS_APP_LANGUAGES: ${{ vars.REACT_APP_IS_APP_LANGUAGES }} | ||||||||||||||||||||||
CI: false # Disabling CI to not treat warnings as errors | ||||||||||||||||||||||
run: npm run build | ||||||||||||||||||||||
|
||||||||||||||||||||||
- name: Deploy to S3 Bucket | ||||||||||||||||||||||
run: aws s3 sync ./build s3://sb-all-rig/ | ||||||||||||||||||||||
|
||||||||||||||||||||||
- name: Debug Environment Variables | ||||||||||||||||||||||
run: | | ||||||||||||||||||||||
echo "REACT_APP_AWS_S3_BUCKET_NAME: $REACT_APP_AWS_S3_BUCKET_NAME" | ||||||||||||||||||||||
echo "AWS_REGION: $AWS_REGION" | ||||||||||||||||||||||
echo "secrate": ${{ vars.REACT_APP_AWS_S3_BUCKET_NAME }} | ||||||||||||||||||||||
Comment on lines
+84
to
+88
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove sensitive information from debug logs. Avoid printing sensitive information such as environment variables in the debug logs. - echo "secrate": ${{ vars.REACT_APP_AWS_S3_BUCKET_NAME }}
+ echo "REACT_APP_AWS_S3_BUCKET_NAME: [REDACTED]" Committable suggestion
Suggested change
|
||||||||||||||||||||||
|
||||||||||||||||||||||
- name: Cloudfront Invalidation | ||||||||||||||||||||||
uses: chetan/invalidate-cloudfront-action@master | ||||||||||||||||||||||
env: | ||||||||||||||||||||||
DISTRIBUTION: ${{ secrets.AWS_DISTRIBUTION }} | ||||||||||||||||||||||
PATHS: '/*' | ||||||||||||||||||||||
AWS_REGION: ${{ secrets.AWS_REGION }} | ||||||||||||||||||||||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||||||||||||||||||||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Optimize the AWS CLI installation step.
Consider combining the
apt-get update
andapt-get install
commands to reduce the number of layers in the Docker image.Committable suggestion