Commit 93c2bfc 1 parent a6d1dcd commit 93c2bfc Copy full SHA for 93c2bfc
File tree 4 files changed +102
-2
lines changed
4 files changed +102
-2
lines changed Original file line number Diff line number Diff line change 32
32
contents : read
33
33
actions : write
34
34
id-token : write
35
-
36
-
Original file line number Diff line number Diff line change
1
+ name : MigrateDown
2
+
3
+ on : workflow_dispatch
4
+
5
+ jobs :
6
+ deploy :
7
+ runs-on : ubuntu-latest
8
+ steps :
9
+ - name : Checkout
10
+ uses : actions/checkout@v4
11
+
12
+ - name : SSH and run commands
13
+ env :
14
+ PRIVATE_KEY : ${{ secrets.SSH_PRIVATE_KEY}}
15
+ run : |
16
+ # copy SSH private key and set rights
17
+ echo "$PRIVATE_KEY" > private_key.pem
18
+ chmod 600 private_key.pem
19
+
20
+ # connect to server
21
+ ssh -o StrictHostKeyChecking=no -i private_key.pem [email protected] <<EOF
22
+
23
+ cd ~/newella/newella-backend
24
+ git checkout main
25
+ git pull
26
+ make migrateDown
27
+
28
+ EOF
29
+
30
+ rm -f private_key.pem
31
+ permissions :
32
+ contents : read
33
+ actions : write
34
+ id-token : write
Original file line number Diff line number Diff line change
1
+ name : MigrateDrop
2
+
3
+ on : workflow_dispatch
4
+
5
+ jobs :
6
+ deploy :
7
+ runs-on : ubuntu-latest
8
+ steps :
9
+ - name : Checkout
10
+ uses : actions/checkout@v4
11
+
12
+ - name : SSH and run commands
13
+ env :
14
+ PRIVATE_KEY : ${{ secrets.SSH_PRIVATE_KEY}}
15
+ run : |
16
+ # copy SSH private key and set rights
17
+ echo "$PRIVATE_KEY" > private_key.pem
18
+ chmod 600 private_key.pem
19
+
20
+ # connect to server
21
+ ssh -o StrictHostKeyChecking=no -i private_key.pem [email protected] <<EOF
22
+
23
+ cd ~/newella/newella-backend
24
+ git checkout main
25
+ git pull
26
+ make migrateDrop
27
+
28
+ EOF
29
+
30
+ rm -f private_key.pem
31
+ permissions :
32
+ contents : read
33
+ actions : write
34
+ id-token : write
Original file line number Diff line number Diff line change
1
+ name : MigrateUp
2
+
3
+ on : workflow_dispatch
4
+
5
+ jobs :
6
+ deploy :
7
+ runs-on : ubuntu-latest
8
+ steps :
9
+ - name : Checkout
10
+ uses : actions/checkout@v4
11
+
12
+ - name : SSH and run commands
13
+ env :
14
+ PRIVATE_KEY : ${{ secrets.SSH_PRIVATE_KEY}}
15
+ run : |
16
+ # copy SSH private key and set rights
17
+ echo "$PRIVATE_KEY" > private_key.pem
18
+ chmod 600 private_key.pem
19
+
20
+ # connect to server
21
+ ssh -o StrictHostKeyChecking=no -i private_key.pem [email protected] <<EOF
22
+
23
+ cd ~/newella/newella-backend
24
+ git checkout main
25
+ git pull
26
+ make migrateUp
27
+
28
+ EOF
29
+
30
+ rm -f private_key.pem
31
+ permissions :
32
+ contents : read
33
+ actions : write
34
+ id-token : write
You can’t perform that action at this time.
0 commit comments