Skip to content
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

Feature/bff #358

Merged
merged 5 commits into from
Dec 12, 2024
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions .github/workflows/aws-deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,12 @@ env:
AWS_REGION: ${{ vars.AWS_DEFAULT_REGION }}
STAGING_CLOUDFRONT_DISTRIBUTION_ID: ${{ secrets.STAGING_CLOUDFRONT_DISTRIBUTION_ID }}
STAGING_S3_BUCKET: s3://staging.biofile-finder.allencell.org
STAGING_BFF_CLOUDFRONT_DISTRIBUTION_ID: ${{ secrets.STAGING_BFF_CLOUDFRONT_DISTRIBUTION_ID }}
STAGING_BFF_S3_BUCKET: s3://staging.bff.allencell.org
PRODUCTION_CLOUDFRONT_DISTRIBUTION_ID: ${{ secrets.PRODUCTION_CLOUDFRONT_DISTRIBUTION_ID }}
PRODUCTION_S3_BUCKET: s3://biofile-finder.allencell.org
PRODUCTION_BFF_CLOUDFRONT_DISTRIBUTION_ID: ${{ secrets.PRODUCTION_BFF_CLOUDFRONT_DISTRIBUTION_ID }}
PRODUCTION_BFF_S3_BUCKET: s3://bff.allencell.org

permissions:
id-token: write # Required for requesting the JWT and OIDC
Expand Down Expand Up @@ -91,8 +95,14 @@ jobs:

# Note that the command below will copy the files to the root of the S3 bucket e.g., s3://biofile-finder.allencell.org/
# If you want to copy files to a S3 prefix / subdirectory, you would want something like ${{ env.S3_BUCKET }}/your_prefix below
- name: Copy build files to S3 root
- name: Copy build files to biofile-finder S3
run: aws s3 sync ./packages/web/dist ${{ env.S3_BUCKET }}

- name: Invalidate CloudFront cache
- name : Copy build filed to BFF S3
run : aws s3 sync ./packages/web/dist ${{env.BFF_S3_BUCKET}}

- name: Invalidate CloudFront biofile-finder cache
imashmash marked this conversation as resolved.
Show resolved Hide resolved
run: aws cloudfront create-invalidation --distribution-id ${{ env.CLOUDFRONT_DISTRIBUTION_ID }} --paths "/*"

- name: Invalidate CloudFront BFF cashe
run: aws cloudfront create-invalidation --distribution-id ${{env.BFF_CLOUDFRONT_DISTRIBUTION_ID}} --path "/*"
Loading