Skip to content

Commit

Permalink
change deploy script
Browse files Browse the repository at this point in the history
  • Loading branch information
cami-espinozaq authored Oct 26, 2023
1 parent 173350e commit e40de5e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 11 deletions.
22 changes: 11 additions & 11 deletions .github/workflows/develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,15 @@ jobs:
aws-access-key-id: ${{ env.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ env.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ env.AWS_REGION }}
- name: test
run: |
mkdir c_folder
touch c_folder/camila_test
aws s3 sync c_folder s3://hackingstudio-code4maus-app-staging/c_folder
#- name: Install dependencies
#- name: test
# run: |
# yarn install
#- name: build app
# run: NODE_ENV=production yarn build
#- name: serverless deploy
# run: SLS_STAGE=staging BRANCH=develop yarn deploy
# mkdir c_folder
# touch c_folder/camila_test
# aws s3 sync c_folder s3://hackingstudio-code4maus-app-staging/c_folder
- name: Install dependencies
run: |
yarn install
- name: build app
run: NODE_ENV=production yarn build
- name: serverless deploy
run: SLS_STAGE=staging BRANCH=develop yarn deploy
3 changes: 3 additions & 0 deletions scripts/deploy-frontend.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/bash

aws sts get-caller-identity

# todo: make dynamic via serverless
BUCKET="hackingstudio-code4maus-app"

Expand All @@ -11,6 +13,7 @@ else
BUCKET="${BUCKET}-dev"
fi

echo "Deploying to bucket: ${BUCKET}"
aws s3 sync build s3://${BUCKET} --delete --acl public-read
for FILE in $(find build -name index.html -printf '%P\n'); do
aws s3 cp build/${FILE} s3://${BUCKET}/${FILE} --metadata-directive REPLACE --cache-control max-age=0,no-cache,no-store,must-revalidate --content-type text/html --acl public-read
Expand Down

0 comments on commit e40de5e

Please sign in to comment.