5

A project has been created and placed on Github. I was trying to explore the Github Actions, with building Angular-cli projects.

The .yml file for githubAction is as follows,

  steps:
        - uses: actions/checkout@v1
        - name: Install NPM
          run:  npm install
        - name: Update Npm
          run:  npm update
        - name: Typescript compiler
          uses: iCrawl/action-tsc@v1
        - name: NpM angular CLI 
          uses: npm install angular-cli
        - name: Build
          run:  npm build

Then while building gets the following error,

The pipeline is not valid. .github/workflows/main.yml (Line: 19, Col: 13): Expected format {org}/{repo}[/path]@ref. Actual 'npm install angular-cli',Input string was not in a correct format.

2 Answers 2

7

you seems to be new in Github Actions and deployments. With my experience, I assume you have reached the point of install Angular-CLI, due to ng not found issues occurred in action flow.

- uses: actions/checkout@v1
- name: Install Node
  uses: actions/setup-node@v1
     with:
        node-version: 12.8
- name: npm dependencies
   run: npm install     
- name: Build
   run: npm run build -- --prod

Fix Detail: Install Node first and then try npm install and npm build

Sign up to request clarification or add additional context in comments.

Comments

-1

I have used Angular Deploy gh-pages Actions GitHub action from the marketplace for setting up Angular in GitHub.

Here is my main.yml file

name: Host Angular app in GitHub 
on:
  push:
    branches:
      - master
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - name: Building and Deploying...
      uses: AhsanAyaz/[email protected] 
      with:
        github_access_token: ${{ secrets.ACCESS_TOKEN }} 
        build_configuration: production 
        base_href: /shopping-cart/  
        deploy_branch: gh-pages 
        angular_dist_build_folder: dist/shopping-cart 

Here are the detailed steps for setting up Angular application in GitHub.

Step by Step instructions here.

1 Comment

This looks like an ads more than an actual answer

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.