We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 3402681 + 494f552 commit a6d1dcdCopy full SHA for a6d1dcd
.github/workflows/deploy.yml
@@ -0,0 +1,36 @@
1
+name: Deploy
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 up
27
28
+ EOF
29
30
+ rm -f private_key.pem
31
+ permissions:
32
+ contents: read
33
+ actions: write
34
+ id-token: write
35
36
0 commit comments