diff --git a/.github/workflows/mekom_cicd.yml b/.github/workflows/mekom_cicd.yml index 41ea320..d6485a8 100644 --- a/.github/workflows/mekom_cicd.yml +++ b/.github/workflows/mekom_cicd.yml @@ -5,6 +5,8 @@ on: workflow_dispatch: push: branches: [ master ] + pull_request: + branches: [ master ] jobs: build: @@ -33,12 +35,15 @@ jobs: needs: build # Specify conditions for when this job should run - if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }} + if: ${{ github.event_name == 'push' || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' }} # Set up enviroment for Publish steps: - # Step 1: Set up JDK 8 for Publish + #set up the build enviroment + - name: Checkout Repository + uses: actions/checkout@v4 + # Step 2: Set up JDK 8 for Publish - name: Set up JDK 8 for Publish uses: actions/setup-java@v4 with: @@ -47,9 +52,6 @@ jobs: server-id: mks-nexus server-username: $MAVEN_USERNAME server-password: $MAVEN_TOKEN - - - name: Navigate to Project Directory - run: cd ${{ github.workspace }} - name: Publish to Mekom repository run: mvn -B deploy