如何发布到github页面? [英] how to publish to github pages?
问题描述
我无法理解有关发布到github页面的一些基本说明.有一种新的方式可以发布使用Angular Cli进行的Angular项目.我在新命令angular-cli-ghpages
中遵循此页面的指示:
i am having trouble understanding some basic instructions on publishing to github pages. There is a new way to publish Angular projects made with Angular Cli; i am following directions from this page on the new command, angular-cli-ghpages
:
Execute angular-cli-ghpages in order to deploy the project with a build from dist folder.
Note: you have to create the dist folder in before (e.g. ng build --prod)
Usage:
ng build --prod --base-href "https://USERNAME.github.io/REPOSITORY/"
angular-cli-ghpages [OPTIONS]
我为项目创建了一个dist文件夹,然后运行ng构建代码.终端显示所有块都已渲染,但是我找不到指向github页面的链接.我在github上的存储库中查找,好像什么都没发生.这是因为我需要CD进入特定文件夹才能执行angular-cli-ghpages吗?这是我的 repo ,非常感谢您的帮助.
I created a dist folder for my project, and then run the ng build code. The terminal shows all the chunks have rendered, but i cannot find a link to the github page. I look in my repository on github and it is as if nothing has happened. Is this because i need to cd into a specific folder to execute angular-cli-ghpages? Here is my repo, I would appreciate very much any help.
推荐答案
我能够使用命令
angular-cli-ghpages --repo=https://github.com/parthghiya/testrepo.git --name=parthghiya --email=parth.ghiya@knowarth.com --no-silent
回购链接: https://github.com/parthghiya/testrepo
我做了ng build --prod --base href .
我做了的步骤:
- 生成了我的SSH&添加了它.
https://help.github.com/articles/连接到github-with-ssh/
- 执行了push命令.
要添加多个文件夹
创建与资产平行的文件夹,我创建了2个文件夹Parth&吉耶然后在 angular-cli.json
Create folder parallel to assets, i created 2 folders Parth & Ghiya. Then added following entry in angular-cli.json
"assets": [
"assets","parth","ghiya",
"favicon.ico",
"manifest.json"
],
因此dist文件夹现在包含3个文件夹资产,即parth& ghiya. 然后像前面一样执行上面的push命令.
So the dist folder now contains 3 folders now assets, parth & ghiya. Then executed the above push command as earlier.
这篇关于如何发布到github页面?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!