-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (30 loc) · 888 Bytes
/
deploy.yaml
File metadata and controls
36 lines (30 loc) · 888 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: Deploy main
on:
push:
branches: ["main"]
env:
NODE_VERSION: 18
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: read
deployments: write
id-token: write
steps:
- name: Checkout current git repository
uses: actions/checkout@v3
- name: AWS - authentication
uses: aws-actions/configure-aws-credentials@v1
with:
aws-region: "eu-central-1"
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
- name: Upload static files to AWS S3
run: |
aws s3 cp ./v5/web/index.js s3://parcellab-cdn/js/v5/web-components/oder-status.js \
--cache-control max-age=86400
- name: Clear the CDN cache
run: |
aws cloudfront create-invalidation \
--distribution-id E3R5S2BJQI4RDS \
--paths "/js/v5/web-components/*"