已经创建了一个项目,并将其放置在Github上。我试图通过构建Angular-cli项目来探索Github操作。
githubAction的.yml文件如下所示:
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然后,在构建时会出现以下错误,
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.发布于 2019-12-24 18:34:44
在Github操作和部署方面,您似乎是个新手。根据我的经验,我假设您已经到了安装Angular-CLI的阶段,因为在操作流程中没有发现问题。
- 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修复细节:先安装Node,然后尝试npm Install和npm build
发布于 2021-01-19 17:37:05
我已经使用市场上的Angular Deploy gh-pages Actions GitHub操作在GitHub中设置了Angular。
这是我的main.yml文件
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/angular-deploy-gh-pages-actions@v1.3.1
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 下面是在GitHub中设置Angular应用程序的detailed steps。
分步说明here。
https://stackoverflow.com/questions/59466378
复制相似问题