Skip to content

updated deployment yml #2

updated deployment yml

updated deployment yml #2

Workflow file for this run

name: Deploy Server to Docker Hub Pipeline
on:
push:
branches:
- master # Change this to your branch name if not 'main'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up JDK 17
uses: actions/setup-java@v2
with:
java-version: "17"
distribution: "adopt"
- name: Build with Maven
working-directory: "./server"
run: mvn clean install
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v2
with:
working-directory: "./server"
context: .
dockerfile: Dockerfile
push: true
tags: neozenith1501/jobwise:server-latest