Skip to content

chore: fix ci (#668) #85

chore: fix ci (#668)

chore: fix ci (#668) #85

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/*