Skip to content
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
21 changes: 18 additions & 3 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ jobs:
run: |
npm ci
npm install @angular/cli > /dev/null
npx ng build
# Ensure consistent output hashing for runtime files
npx ng build --output-hashing=bundles

- name: Deploy Main Site
uses: JamesIves/github-pages-deploy-action@v4.7.3
Expand All @@ -41,7 +42,14 @@ jobs:
AWS_REGION: us-east-1
if: github.ref == 'refs/heads/main'
run: |
aws s3 sync --delete ./dist s3://${{ secrets.AWS_PROD_BUCKET }}
# Deploy HTML files with no-cache to prevent stale references
aws s3 sync --delete ./dist s3://${{ secrets.AWS_PROD_BUCKET }} \
--exclude "*" --include "*.html" \
--cache-control "no-cache, no-store, must-revalidate"

# Deploy all other files normally
aws s3 sync ./dist s3://${{ secrets.AWS_PROD_BUCKET }} \
--exclude "*.html"

- name: Deploy S3 Staging
env:
Expand All @@ -50,4 +58,11 @@ jobs:
AWS_REGION: us-east-1
if: github.ref == 'refs/heads/develop'
run: |
aws s3 sync --delete ./dist s3://${{ secrets.AWS_STAGING_BUCKET }}
# Deploy HTML files with no-cache to prevent stale references
aws s3 sync --delete ./dist s3://${{ secrets.AWS_STAGING_BUCKET }} \
--exclude "*" --include "*.html" \
--cache-control "no-cache, no-store, must-revalidate"

# Deploy all other files normally
aws s3 sync ./dist s3://${{ secrets.AWS_STAGING_BUCKET }} \
--exclude "*.html"