Skip to content

fix: update frontend version in webapp package after publication (#1571) #828

fix: update frontend version in webapp package after publication (#1571)

fix: update frontend version in webapp package after publication (#1571) #828

name: Upload integration templates to S3
on:
push:
branches:
- master
pull_request:
branches:
- master
types:
- closed
concurrency:
group: templates-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
template-upload:
runs-on: ubuntu-latest
if: (github.event_name == 'push') || (github.event_name == 'pull_request' && github.event.pull_request.merged == true)
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install nango CLI
run: |
npm install -g nango
npm install @tsconfig/node18-strictest-esm --save-dev
- name: Get specific changed files
id: changed-files-specific
uses: tj-actions/changed-files@v41
with:
files: |
integration-templates/*
integration-templates/**/*
- name: Process and Upload changed directories to S3
if: steps.changed-files-specific.outputs.any_changed == 'true'
run: |
wd=$(pwd)
for file in ${{ steps.changed-files-specific.outputs.all_changed_files }}; do
dir=$(dirname $file)
mkdir -p /tmp/nango-temp/nango-integrations
cp -r $dir/* /tmp/nango-temp/nango-integrations/
cd /tmp/nango-temp/nango-integrations
nango compile
cp -r dist/ $wd/$dir/
cd -
rm -rf /tmp/nango-temp
aws s3 sync $dir s3://${{ secrets.AWS_BUCKET_NAME }}/$dir/
done
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: ${{ secrets.AWS_REGION }}