Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
Giacomo Licari committed Jan 10, 2024
2 parents e6373d1 + 290084b commit 631c964
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/deploy.yml → .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ jobs:
deploy:
name: Deployment
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./website

steps:
- name: Cancel Previous Runs
Expand All @@ -46,6 +43,7 @@ jobs:
uses: actions/setup-node@v2

- name: Install
working-directory: ./website
run: |
rm -rf .cache
rm -rf build
Expand All @@ -54,6 +52,7 @@ jobs:
pip install awscli --upgrade --user
- name: Build App
working-directory: ./website
run: yarn build

- name: Configure AWS Development credentials
Expand All @@ -74,20 +73,23 @@ jobs:

# Script to deploy to development environment
- name: 'Deploy to S3: Development'
working-directory: ./website
if: github.ref == 'refs/heads/dev'
run: |
aws s3 sync build/ s3://${{ secrets.DEV_BUCKET_NAME }}/dev --exclude "*.html" --cache-control max-age=0,no-cache,no-store,public
aws s3 sync build/ s3://${{ secrets.DEV_BUCKET_NAME }}/dev --exclude "*" --include "*.html" --cache-control max-age=0,no-cache,no-store,must-revalidate --content-type text/html
# Script to deploy to staging environment
- name: 'Deploy to S3: Staging'
working-directory: ./website
if: github.ref == 'refs/heads/main'
run: |
aws s3 sync build/ s3://${{ secrets.DEV_BUCKET_NAME }}/staging --exclude "*.html" --cache-control max-age=0,no-cache,no-store,public
aws s3 sync build/ s3://${{ secrets.DEV_BUCKET_NAME }}/staging --exclude "*" --include "*.html" --cache-control max-age=0,no-cache,no-store,must-revalidate --content-type text/html
# Script to deploy to release environment
- name: 'Deploy to S3: Release'
working-directory: ./website
if: github.ref == 'refs/heads/release'
run: |
aws s3 sync build/ s3://${{ secrets.RELEASE_BUCKET_NAME }} --delete --exclude "*.html" --exclude "sitemap.xml" --cache-control max-age=86400,public
Expand Down

0 comments on commit 631c964

Please sign in to comment.