We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 072a985 + 762eeae commit 2287a2cCopy full SHA for 2287a2c
1 file changed
.github/workflows/gradle.yml
@@ -0,0 +1,21 @@
1
+name: Deploy to EC2 on develop push
2
+
3
+on:
4
+ push:
5
+ branches: [ "main" ]
6
7
+jobs:
8
+ deploy:
9
+ runs-on: ubuntu-latest
10
11
+ steps:
12
+ - name: Add SSH Key
13
+ uses: webfactory/ssh-agent@v0.5.4
14
+ with:
15
+ ssh-private-key: ${{ secrets.SSH_KEY }}
16
17
+ - name: Add EC2 Host to known_hosts
18
+ run: ssh-keyscan -H ${{ secrets.SERVER_IP }} >> ~/.ssh/known_hosts
19
20
+ - name: Run deploy.sh on EC2
21
+ run: ssh ${{ secrets.SSH_USER }}@${{ secrets.SERVER_IP }} "bash /home/ubuntu/deploy.sh"
0 commit comments