Unable to build and deploy my project

HI All,
I am new to github. i am trying to automat my build and deployment using Github action. I attached my error image

Following error i am getting

Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on project payasia-parent: Failed to deploy artifacts: Could not find artifact com.payasia:payasia-parent:pom:0.0.1 in github (https://maven.pkg.github.com/sampathforzia/hronline-classic/payasia-parent) → [Help 1]

286

my actions given below,

This is a basic workflow to help you get started with Actions

name: Build Classic HR online

Controls when the action will run.

on:

Triggers the workflow on push or pull request events but only for the main branch

push:
branches: [ master, Payasia-Production ]
pull_request:
branches: [ master ]
release:
types: [created]

Allows you to run this workflow manually from the Actions tab

workflow_dispatch:

A workflow run is made up of one or more jobs that can run sequentially or in parallel

jobs:

This workflow contains a single job called “build”

build:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
  # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
  - name: Step1- Checkout workspace
    uses: actions/checkout@v2

  # Runs a single command using the runners shell
  - name: Step2- Setup JDK version 1.8
    uses: actions/setup-java@v1.4.3
    with: 
      java-version: 1.8
      server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
      settings-path: ${{ github.workspace }}/payasia-parent # location for the settings.xml file
    
  - name: Cache the Maven packages to speed up build
    uses: actions/cache@v1
    with:
      path: ~/.m2
      key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
      restore-keys: ${{ runner.os }}-m2   

   
  # Runs a set of commands using the runners shell  run: mvn clean -B package --file payasia-parent/pom.xml -Dmaven.test.skip=true
  - name: Step3 - build Maven from Github
    run: mvn -B package --file payasia-parent/pom.xml -Dmaven.test.skip=true
   # mvn -B package --file payasia-parent/pom.xml -Dmaven.test.skip=true      ${{ github.workspace }}/settings.xml
  - name: maven-settings-xml-action
    uses: whelk-io/maven-settings-xml-action@v14
    with:
      repositories: '[{ "id": "github", "name": "HROnline-Classic", "url": "https://maven.pkg.github.com/sampathforzia/hronline-classic/payasia-parent", "releases": { "enabled": "false" }, "snapshots": { "enabled": "false" } }]'    
      servers: '[{ "id": "github", "username": "${env.GITHUB_ACTOR}", "password": "${env.GITHUB_TOKEN}" }]'
    
      
  - name: Publish to GitHub Packages Apache Maven
    run: mvn deploy --file payasia-parent/pom.xml -s ~/.m2/settings.xml
    env:
      GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Hi there @sampathforzia and welcome! Are you still having these issues? If so, are you able to post your pom.xml file maybe? It seems the package isn’t available in the GitHub Package Registry. Adding any more details improves the chances of someone recognizing the issue.