Skip to content

Commit

Permalink
Chnage build process from static to next build
Browse files Browse the repository at this point in the history
  • Loading branch information
gMonty committed Jan 14, 2025
1 parent 1c65424 commit fe90b0f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/dev_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
pip install awscli --upgrade --user
- name: Build website
run: yarn static
run: yarn build

- name: Configure AWS Dev credentials
uses: aws-actions/configure-aws-credentials@v1
Expand All @@ -51,7 +51,9 @@ jobs:
# Script to deploy to the dev environment
- name: 'Deploy to S3: Dev'
if: github.ref == 'refs/heads/master'
run: aws s3 sync out s3://${{ secrets.DEV_BUCKET_NAME }}/current --delete
run: |
aws s3 sync .next/static/ s3://${{ secrets.DEV_BUCKET_NAME }} --delete --exclude "*.html" --cache-control max-age=86400,public
aws s3 sync .next/static/ s3://${{ secrets.DEV_BUCKET_NAME }} --delete --exclude "*" --include "*.html" --cache-control max-age=0,no-cache,no-store,must-revalidate --content-type text/html
- name: 'Cloudfront Production: cache invalidation'
if: (startsWith(github.event.ref, 'refs/tags/v') || github.event_name == 'release')
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/prod_deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
pip install awscli --upgrade --user
- name: Build App
run: yarn static
run: yarn build

- name: Configure AWS Production credentials
uses: aws-actions/configure-aws-credentials@v1
Expand All @@ -56,8 +56,8 @@ jobs:

- name: 'Deploy to S3: Production'
run: |
aws s3 sync out/ s3://${{ secrets.PROD_BUCKET_NAME }} --delete --exclude "*.html" --cache-control max-age=86400,public
aws s3 sync out/ s3://${{ secrets.PROD_BUCKET_NAME }} --delete --exclude "*" --include "*.html" --cache-control max-age=0,no-cache,no-store,must-revalidate --content-type text/html
aws s3 sync .next/static/ s3://${{ secrets.PROD_BUCKET_NAME }} --delete --exclude "*.html" --cache-control max-age=86400,public
aws s3 sync .next/static/ s3://${{ secrets.PROD_BUCKET_NAME }} --delete --exclude "*" --include "*.html" --cache-control max-age=0,no-cache,no-store,must-revalidate --content-type text/html
- name: 'Cloudfront Production: cache invalidation'
if: (startsWith(github.event.ref, 'refs/tags/v') || github.event_name == 'release')
Expand Down

0 comments on commit fe90b0f

Please sign in to comment.