Skip to content

Commit

Permalink
Merge pull request #113 from AllenInstitute/feature/build-attempt
Browse files Browse the repository at this point in the history
Modify build in AWS workflow
  • Loading branch information
SeanLeRoy authored May 23, 2024
2 parents cf2fbc6 + aad2e14 commit ac376e7
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions .github/workflows/aws-deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,19 @@ jobs:

- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8
with:
node-version: "18"
node-version: "16"

- name: Install and Build
run: npm ci && npx vite build
- name: Install Dependencies
run: npm ci

- name: Build
run: npm run --prefix packages/web build

- name: Upload build files
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3
with:
name: aws-deploy-files
path: ./dist
path: ./packages/web/dist

deploy:
needs: build
Expand Down Expand Up @@ -84,12 +87,12 @@ jobs:
uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427
with:
name: aws-deploy-files
path: ./dist
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 ./dist ${{ env.S3_BUCKET }}
run: aws s3 sync ./packages/web/dist ${{ env.S3_BUCKET }}

- name: Invalidate CloudFront cache
run: aws cloudfront create-invalidation --distribution-id ${{ env.CLOUDFRONT_DISTRIBUTION_ID }} --paths "/*"

0 comments on commit ac376e7

Please sign in to comment.