-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
based on: ItsKarma/aws-cli#7
- Loading branch information
Showing
1 changed file
with
8 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,10 @@ name: Node.js CI | |
on: | ||
push: | ||
branches: [ production ] | ||
env: | ||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
AWS_DEFAULT_REGION: "eu-central-1" | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
@@ -24,19 +28,8 @@ jobs: | |
- run: yarn sitemap | ||
- run: yarn build | ||
- name: S3 Sync | ||
uses: ItsKarma/[email protected] | ||
with: | ||
args: s3 sync --delete --acl public-read build/ s3://czarymarry.com/ | ||
env: | ||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
AWS_DEFAULT_REGION: "eu-central-1" | ||
run: aws s3 sync --delete --acl public-read build/ s3://czarymarry.com/ | ||
- name: Invalidate Cloud Front Cache | ||
uses: ItsKarma/[email protected] | ||
with: | ||
args: cloudfront create-invalidation --distribution-id E3OU4VYZREVR6T --paths /* | ||
env: | ||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
AWS_DEFAULT_REGION: "eu-central-1" | ||
- run: "curl -X POST \"https://api.cloudflare.com/client/v4/zones/${{ secrets.CF_ZONE }}/purge_cache\" -H \"X-Auth-Email: ${{ secrets.CF_EMAIL }}\" -H \"X-Auth-Key: ${{ secrets.CF_API_KEY }}\" -H \"Content-Type: application/json\" --data '{\"purge_everything\":true}'" | ||
run: aws cloudfront create-invalidation --distribution-id E3OU4VYZREVR6T --paths /* | ||
- name: Invalidate Cloud Front Cache | ||
run: "curl -X POST \"https://api.cloudflare.com/client/v4/zones/${{ secrets.CF_ZONE }}/purge_cache\" -H \"X-Auth-Email: ${{ secrets.CF_EMAIL }}\" -H \"X-Auth-Key: ${{ secrets.CF_API_KEY }}\" -H \"Content-Type: application/json\" --data '{\"purge_everything\":true}'" |