Skip to content

Commit

Permalink
Merge pull request #69 from andreciornavei/develop
Browse files Browse the repository at this point in the history
add new step to build bucket name
  • Loading branch information
andreciornavei authored Mar 8, 2024
2 parents b03cf62 + a771a82 commit c235e51
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,12 @@ jobs:
echo "AWS_SECRET_ACCESS_KEY=${{ secrets.AWS_SECRET_ACCESS_KEY }}" >> $GITHUB_ENV
if: success()

# This step expose variables to environment
- name: Expose required environment variables (composed)
run: |
echo "S3_DOMAIN=${APP_NAME}.$([ "${BRANCH}" != "production" ] && echo "${BRANCH}.")${DOMAIN}" >> $GITHUB_ENV
if: success()

# This step build reactjs application to be deployed.
- name: Build ReactJS application
run: |
Expand Down Expand Up @@ -128,7 +134,6 @@ jobs:
- name: Release application on AWS S3 and invalidate CloudFront cache
run: |
cd frontend
echo "S3_DOMAIN=${APP_NAME}.$([ "${BRANCH}" != "production" ] && echo "${BRANCH}.")${DOMAIN}" >> $GITHUB_ENV
echo "S3_DOMAIN=${S3_DOMAIN}"
aws s3 sync build/ s3://${S3_DOMAIN}
SLS_OUTPUT=$(cat sls-output.json)
Expand Down

0 comments on commit c235e51

Please sign in to comment.