-
Notifications
You must be signed in to change notification settings - Fork 37
44 lines (42 loc) · 1.14 KB
/
upload-webchat-staging.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
34
35
36
37
38
39
40
41
42
43
44
name: Upload Webchat Staging
on:
workflow_dispatch: {}
push:
branches:
- master
paths:
- 'packages/inject/**'
- 'packages/components/**'
- 'packages/webchat/**'
- 'packages/socket/**'
permissions:
id-token: write
contents: read
jobs:
upload_webchat:
name: Upload Webchat
environment: staging
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./packages/inject
steps:
- uses: actions/checkout@v2.1.0
- uses: actions/setup-node@v2
with:
node-version-file: '.nvmrc'
cache: 'yarn'
- name: Fetch Node Packages
run: |
yarn --immutable
- name: Build Webchat
run: |
yarn build
yarn write:version
- uses: botpress/gh-actions/deploy/s3@v2
with:
aws-role: ${{ secrets.AWS_WEBCHAT_UPLOAD_ROLE }}
source: ./packages/inject/dist
destination: s3://${{ secrets.AWS_WEBCHAT_BUCKET_NAME }}/webchat/v1
cloudfront-distribution-id: ${{ secrets.AWS_WEBCHAT_CLOUDFRONT_DISTRIBUTION_ID }}
cloudfront-invalidation-prefix: /webchat/v1/*