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 all 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
20 changes: 13 additions & 7 deletions .github/workflows/aws-deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,11 @@ env:
AWS_ACCOUNT_ID: ${{ vars.AWS_PUBLIC_DATA_RELEASES_ACCOUNT_ID }}
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_S3_BUCKET: s3://staging.bff.allencell.org
STAGING_BFF_CLOUDFRONT_DISTRIBUTION_ID: ${{ secrets.STAGING_BFF_CLOUDFRONT_DISTRIBUTION_ID }}
PRODUCTION_CLOUDFRONT_DISTRIBUTION_ID: ${{ secrets.PRODUCTION_CLOUDFRONT_DISTRIBUTION_ID }}
PRODUCTION_S3_BUCKET: s3://biofile-finder.allencell.org
PRODUCTION_S3_BUCKET: s3://bff.allencell.org
PRODUCTION_BFF_CLOUDFRONT_DISTRIBUTION_ID: ${{ secrets.PRODUCTION_BFF_CLOUDFRONT_DISTRIBUTION_ID }}

permissions:
id-token: write # Required for requesting the JWT and OIDC
Expand Down Expand Up @@ -89,10 +91,14 @@ jobs:
name: aws-deploy-files
path: ./packages/web/dist

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

- name: Invalidate CloudFront cache
# This isn't strictly necessary since this distribution only handles redirects and doesn't serve any content directly
- 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