@vighnalabs-packages/utilities 0.0.2 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
name: Deploy Production
|
|
2
2
|
|
|
3
3
|
on:
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
push:
|
|
5
|
+
branches: [production]
|
|
6
6
|
|
|
7
7
|
jobs:
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
build-and-deploy:
|
|
9
|
+
runs-on: ubuntu-latest
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
11
|
+
steps:
|
|
12
|
+
- name: Get SSH keys and set permissions
|
|
13
|
+
run: |
|
|
14
|
+
mkdir -p ~/.ssh
|
|
15
|
+
echo "${{ secrets.MAC_AIR_PRIVATE_KEY }}" > ~/.ssh/id_rsa && chmod 600 ~/.ssh/id_rsa
|
|
16
|
+
- name: Deploy to Server
|
|
17
|
+
run: ssh -o StrictHostKeyChecking=no -i ~/.ssh/id_rsa ${{ secrets.SH_USER }}@${{ secrets.DEBIAN_SERVER_IP }} 'cd vighnalabs/vighnalabs-packages/utilities/ && sh deploy.production.sh'
|
package/deploy.production.sh
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
#!/bin/bash
|
|
2
|
-
echo "
|
|
3
|
-
git
|
|
2
|
+
echo "Started Production Deployment"
|
|
3
|
+
git checkout production
|
|
4
4
|
|
|
5
|
-
echo "
|
|
6
|
-
|
|
5
|
+
echo "Pulling Latest Code"
|
|
6
|
+
git fetch origin
|
|
7
|
+
git reset --hard origin/production
|
|
7
8
|
|
|
8
|
-
echo "
|
|
9
|
+
echo "Installing Dependencies"
|
|
10
|
+
npm ci
|
|
11
|
+
|
|
12
|
+
echo "Running Deployment"
|
|
9
13
|
npm run deploy
|