-
Notifications
You must be signed in to change notification settings - Fork 1
68 lines (53 loc) · 2.17 KB
/
deploy-scripts-internally.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: Deploy Scripts Internally
on:
push:
branches:
- main
concurrency:
group: deploy-templates-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
template-upload:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Node.js
uses: actions/setup-node@v4
with:
cache: 'npm'
node-version-file: '.nvmrc'
- name: Install nango CLI
run: |
npm install -g nango
NANGO_CLI_UPGRADE_MODE=ignore nango version --debug
- name: Process and deploy integrations
run: |
set +e
dirs=$(find integrations -maxdepth 1 -type d | tail -n +2)
for dir in $dirs; do
integration=$(basename "$dir")
mkdir -p "/tmp/nango-temp/nango-integrations/$integration"
cp "$dir/nango.yaml" /tmp/nango-temp/nango-integrations/
cp -r "$dir"/* "/tmp/nango-temp/nango-integrations/$integration/"
cd /tmp/nango-temp/nango-integrations
npm install zod soap botbuilder
response=$(nango admin:deploy-internal template-"$integration")
exit_code=$?
echo "$response" | grep -q "unknown_provider_config"
if [ $? -eq 0 ]; then
echo "Warning: Unknown provider config for $integration"
cd -
rm -rf /tmp/nango-temp
continue
fi
if [ $exit_code -ne 0 ]; then
echo "Error in deployment for $integration: $response"
exit 1
fi
echo "Deployment successful for $integration"
cd -
rm -rf /tmp/nango-temp
done
env:
NANGO_SECRET_KEY_DEV: ${{ secrets.NANGO_SHARED_DEV_ACCOUNT_SECRET_KEY }}