-
Notifications
You must be signed in to change notification settings - Fork 0
33 lines (30 loc) · 1.04 KB
/
cd.yml
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
name: Deploy
on: [push, pull_request]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Node.js setup
uses: actions/setup-node@v4
with:
node-version: 16.x
- name: Build
run: |
npm ci
npm run build
- name: Update
if: ${{ github.event_name == 'push' && github.ref_name == 'main' && env.AWS_REGION != '' }}
uses: kazimanzurrashid/aws-static-web-app-update-action@v1.0.1
with:
location: ./build
bucket: ap-south-1.movement-pass.com
cache-control: |
public, max-age=31536000, immutable: ['**', '!./index.html', '!./manifest.json']
max-age=0, no-cache, no-store, must-revalidate: ['./index.html']
invalidate: true
env:
AWS_REGION: ${{ secrets.AWS_REGION }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}