Skip to content

Commit

Permalink
removed step 4-6
Browse files Browse the repository at this point in the history
  • Loading branch information
Mandar-Beehyv committed Jan 8, 2025
1 parent ec153f4 commit 0f2c5b1
Showing 1 changed file with 0 additions and 39 deletions.
39 changes: 0 additions & 39 deletions .github/workflows/NMSReportingSuite-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,42 +23,3 @@ jobs:
- name: Build with Maven
run: mvn clean install -f NMSReportingSuite/pom.xml

# Step 4: Shutdown Tomcat if it is started
- name: Shutdown Tomcat if it is up
uses: appleboy/[email protected]
with:
host: ${{ secrets.STAGING_HOST }}
username: ${{ secrets.STAGING_USER }}
password: ${{ secrets.STAGING_PASSWORD }}
script: |
if pgrep -f "org.apache.catalina.startup.Bootstrap" > /dev/null; then
echo "Tomcat is running. Shutting it down..."
sh /usr/local/tomcat/apache-tomcat-7.0.108/bin/shutdown.sh
else
echo "Tomcat is not running."
fi
# Step 5: Deploy to Staging Server
- name: Deploy to Staging
uses: appleboy/[email protected]
with:
host: ${{ secrets.STAGING_HOST }}
username: ${{ secrets.STAGING_USER }}
password: ${{ secrets.STAGING_PASSWORD }}
source: "NMSReportingSuite/target/*.war"
target: /usr/local/tomcat/apache-tomcat-7.0.108/webapps

# Step 6: Restart Application (if needed)
- name: Restart Tomcat
uses: appleboy/[email protected]
with:
host: ${{ secrets.STAGING_HOST }}
username: ${{ secrets.STAGING_USER }}
password: ${{ secrets.STAGING_PASSWORD }}
script: |
if ! pgrep -f "org.apache.catalina.startup.Bootstrap" > /dev/null; then
echo "Tomcat is not running. Starting it up..."
sh /usr/local/tomcat/apache-tomcat-7.0.108/bin/startup.sh
else
echo "Tomcat is already running."
fi

0 comments on commit 0f2c5b1

Please sign in to comment.