forked from BLC/sgeUpdated
test #6
@@ -1,15 +1,15 @@
|
|||||||
name: sgeUpdated CI/CD
|
name: sgeUpdated CI/CD
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
pull_request:
|
pull_request:
|
||||||
|
types:
|
||||||
|
- closed # Fires when a PR is closed (either merged or manually closed)
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main # Only when PR targets main
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
deploy:
|
deploy:
|
||||||
|
if: github.event.pull_request.merged == true # Run only if the PR was merged (not just closed)
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
@@ -23,7 +23,7 @@ jobs:
|
|||||||
- name: Run deploy script on server
|
- name: Run deploy script on server
|
||||||
run: |
|
run: |
|
||||||
ssh ${{ secrets.SERVER_USER }}@${{ secrets.SERVER_HOST }} << 'EOF'
|
ssh ${{ secrets.SERVER_USER }}@${{ secrets.SERVER_HOST }} << 'EOF'
|
||||||
echo "✅ Connected to server. Running deploy script..."
|
echo "✅ PR merged into main — running deploy script..."
|
||||||
cd /home/ubuntu/Bgreen/sgeUpdated
|
cd /home/ubuntu/Bgreen/sgeUpdated
|
||||||
./deploy.sh
|
./deploy.sh
|
||||||
EOF
|
EOF
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
</parent>
|
</parent>
|
||||||
<groupId>com.sgs</groupId>
|
<groupId>com.sgs</groupId>
|
||||||
<artifactId>sgs</artifactId>
|
<artifactId>sgs</artifactId>
|
||||||
<version>0.0.2-SNAPSHOT</version>
|
<version>0.0.4-SNAPSHOT</version>
|
||||||
<name>sgs</name>
|
<name>sgs</name>
|
||||||
<description>SGS project for Spring Boot</description>
|
<description>SGS project for Spring Boot</description>
|
||||||
<properties>
|
<properties>
|
||||||
|
|||||||
Reference in New Issue
Block a user