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

fix(ci) Fix clean cache for staging #1077

Merged
merged 1 commit into from
Mar 11, 2024
Merged
Show file tree
Hide file tree
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
12 changes: 3 additions & 9 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,17 +127,11 @@ jobs:
ref: ${{ github.head_ref }}
env: ${{ env.ENV }}

- name: Deploy to S3 for dev
if: github.event_name == 'pull_request'
run: aws s3 sync "dist/public/" "s3://${{ vars.AWS_BUCKET_NAME }}/${{ github.head_ref }}/" --delete

- name: Deploy to S3 for production
if: github.ref == 'refs/heads/master' && github.event_name == 'push'
run: aws s3 sync "dist/public/" "s3://${{ vars.AWS_BUCKET_NAME }}/" --delete
- name: Deploy to S3
run: aws s3 sync "dist/public/" "s3://${{ vars.AWS_BUCKET_NAME }}${{ env.BASE_URL }}" --delete

- name: Clear caches
if: github.ref == 'refs/heads/master' && github.event_name == 'push'
run: aws cloudfront create-invalidation --distribution-id "${{ secrets.AWS_CLOUDFRONT_DISTRIBUTION_ID }}" --paths "/*"
run: aws cloudfront create-invalidation --distribution-id "${{ secrets.AWS_CLOUDFRONT_DISTRIBUTION_ID }}" --paths "${{ env.BASE_URL }}*"

- name: Indexing on Algolia
run: yarn indexation:algolia
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-closed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@ jobs:
with:
step: deactivate-env
token: ${{ secrets.GITHUB_TOKEN }}
env: "dev-${{ github.head_ref }}"
env: ${{ github.head_ref }}
desc: Environment was pruned
Loading