This repository has been archived by the owner on Sep 16, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 74
44 lines (37 loc) · 1.61 KB
/
deploy-js-sdk.yaml
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
37
38
39
40
41
42
43
44
name: Build the TS SDK upload to S3, and invalidate cloudFront cache
on:
push:
branches:
- main
jobs:
build-upload-invalidate:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: 14
- name: Install Dependencies
run: yarn install
- name: Build SDK
run: yarn workspace @revertdotdev/js build
env:
CORE_API_BASE_URL: ${{ secrets.CORE_API_BASE_URL }}
REDIRECT_URL_BASE: ${{ secrets.REDIRECT_URL_BASE }}
# - name: Upload to S3
# uses: jakejarvis/s3-sync-action@master
# with:
# args: --acl public-read --follow-symlinks --delete
# env:
# AWS_S3_BUCKET: your-bucket-name
# AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
# AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
# SOURCE_DIR: path/to/your/dist/directory
# - name: Invalidate CloudFront Cache
# run: |
# aws configure set aws_access_key_id ${{ secrets.AWS_ACCESS_KEY_ID }}
# aws configure set aws_secret_access_key ${{ secrets.AWS_SECRET_ACCESS_KEY }}
# aws configure set default.region your-aws-region
# aws cloudfront create-invalidation --distribution-id your-cloudfront-distribution-id --paths "/*"