We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 60a92b8 commit f9094c4Copy full SHA for f9094c4
1 file changed
.github/workflows/CI-CD.yml
@@ -3,7 +3,7 @@ name: CI/CD for Spring Boot App
3
on:
4
push:
5
branches:
6
- - main
+ - master
7
8
jobs:
9
build:
@@ -43,22 +43,4 @@ jobs:
43
id: setup-key
44
env:
45
DEPLOY_KEY: ${{ secrets.DEPLOY_KEY }}
46
- run: |
47
- echo "$DEPLOY_KEY" > $HOME/key.pem
48
- chmod 400 $HOME/key.pem
49
- cat $HOME/key.pem # Debugging step to verify key content
50
-
51
- - name: Copy WAR to EC2
52
- uses: appleboy/scp-action@master
53
- with:
54
- host: ${{ secrets.DEPLOY_HOST }}
55
- username: ec2-user
56
- key: ${{ secrets.DEPLOY_KEY }}
57
- source: "target/*.war"
58
- target: "/home/ec2-user/deployment/"
59
60
- - name: Connect SSH and Restart Services
61
62
- ssh -o StrictHostKeyChecking=no -i $HOME/key.pem ec2-user@${{ secrets.DEPLOY_HOST }} '
63
- sudo systemctl restart spring-boot-app
64
- '
+ run: |
0 commit comments