mirror of
https://github.com/Lissy93/web-check.git
synced 2025-01-08 15:19:16 +01:00
Updates AWS action, to also build + deploy frontend, to S3 + Cloudfront
This commit is contained in:
parent
3aa385cf41
commit
daf6850052
36
.github/workflows/deploy-aws.yml
vendored
36
.github/workflows/deploy-aws.yml
vendored
@ -35,3 +35,39 @@ jobs:
|
|||||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||||
run: serverless deploy
|
run: serverless deploy
|
||||||
|
|
||||||
|
|
||||||
|
deploy-frontend:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Setup Node.js
|
||||||
|
uses: actions/setup-node@v1
|
||||||
|
with:
|
||||||
|
node-version: 16
|
||||||
|
|
||||||
|
- name: Install dependencies and build
|
||||||
|
run: |
|
||||||
|
yarn install
|
||||||
|
yarn build
|
||||||
|
|
||||||
|
- name: Upload to S3
|
||||||
|
uses: jakejarvis/s3-sync-action@master
|
||||||
|
with:
|
||||||
|
args: --acl public-read --follow-symlinks --delete
|
||||||
|
env:
|
||||||
|
AWS_S3_BUCKET: web-check-frontend
|
||||||
|
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||||
|
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||||
|
AWS_REGION: 'us-east-1'
|
||||||
|
|
||||||
|
- name: Invalidate CloudFront cache
|
||||||
|
uses: chetan/invalidate-cloudfront-action@1.3
|
||||||
|
env:
|
||||||
|
DISTRIBUTION: E30XKAM2TG9FD8
|
||||||
|
PATHS: '/*'
|
||||||
|
AWS_REGION: 'us-east-1'
|
||||||
|
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||||
|
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||||
|
Loading…
Reference in New Issue
Block a user