Free live webinar • November 21, 2026 • 9:30 AM CST   Register free →
2017–2027Celebrating Our 10th Year

Transform Your Career.
Engineer Your Future.

Build the skills to become an AI-Enabled DevSecOps & Cloud Engineer with 15 weeks of live training, hands-on labs and personal mentorship.

Coach AK in his DevOps learning studio
Coach AK | Ananth KannanSenior DevOps & SRE Architect • Founder, CoachDevOps
3,500+Students Trained
25+ YearsIT Experience
15 WeeksLive Training
70+Hands-on Labs

Master In-Demand Technologies

AWSAzureDockerKubernetesTerraformJenkinsGitHub ActionsAnsibleGitLab

AI-Enabled DevSecOps & Cloud Engineering Bootcamp

Next weekend batch: December 5, 2026
Saturday 9:30–11:30 AM CST • Sunday 10:30 AM–12:30 PM CST

Live classes, practical projects, personal mentorship and career preparation.

View Program Details →

Real Students. Real Success.

Career milestones shared by our students.

✓ Placement in an AI role
“The concepts you taught have improved my technical understanding and confidence.”
ManimaranJuly 2026 Bootcamp
✓ DevSecOps Engineer offer
“I want to sincerely thank you for your mentorship, training, and support.”
Femi AshayeCoachDevOps Alumni
✓ DevOps Engineer offer
“I got an offer for Devops engineer Last week and happy to inform you. I really appreciate you.”
EbenezerCoachDevOps Alumni
View All Success Stories →

Individual student experiences; employment is not guaranteed.

Ready to Take the Next Step?

Explore the program or get answers to your questions before enrolling.

Saturday, March 8, 2025

How to Implement CICD Pipeline using GitHub Actions | GitHub Actions Tutorials | GitHub Actions CICD Pipeline | How to Deploy Java WAR file using GitHub Actions and Maven to Tomcat Server

Please find steps for Deploying Java WAR file to Tomcat using GitHub Actions:

Watch GitHub Actions CICD in YouTube:

    Pre-requisites:

    Implementation steps:

    We need to setup secrets to store tomcat user name, password and Tomcat url.

    Add Tomcat user name, password and Tomcat Host url as Secret in GitHub Actions

    Go to your GitHub Repo --> Settings --> 

    Click on Secrets and Variables under Security in left nav 
    Click new Repository Secret

    Create TOMCAT_HOST secret and add tomcat url

    Create TOMCAT_USER secret and add user name
    Create TOMCAT_PASSWORD secret and Tomcat password


    GitHub Actions Workflow YAML for Deploying a WAR file to Tomcat

    You will create this file .github/workflows/cicd.yaml inside GitHub Repo where your Java code is.

    name: Build a WAR file using Maven and Deploy Java App to Tomcat running in AWS EC2
    on:
      push:
        branches: [ "main" ]
    jobs:
      build:
        runs-on: ubuntu-latest
        steps:
        - uses: actions/checkout@v3
        - name: Set up JDK 17
          uses: actions/setup-java@v4
          with:
            distribution: 'temurin'
            java-version: '17'
            cache: 'maven'
        - name: Build with Maven
          run: mvn clean install -f MyWebApp/pom.xml
        - name: Deploy to Tomcat
          run: |
            curl -v -u ${{ secrets.TOMCAT_USER }}:${{ secrets.TOMCAT_PASSWORD }} \
            -T MyWebApp/target/MyWebApp.war \
            "http://${{ secrets.TOMCAT_HOST }}/manager/text/deploy?path=/MyWebApp&update=true"

    Commit the file.

    As soon as you commit, build will run immediately in GitHub Actions. 
    Now you can see the output of build in Actions tab.

    Check the output in Tomcat

    No comments:

    Post a Comment