Skip to content

Commit

Permalink
aws cli error fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jaaaco authored Nov 11, 2021
1 parent 72cbf01 commit f4f18f7
Showing 1 changed file with 8 additions and 15 deletions.
23 changes: 8 additions & 15 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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}'"

0 comments on commit f4f18f7

Please sign in to comment.