如何将web应用部署在Github page上
(1) Create a new empty github repository:
The local project has the following folder structure:
lib( folder )
|- angular.js
angular_controller.html
Follow the instructions in above picture to push the local project to github. Once done, it should look like below:
(2) use command git checkout –orphan gh-pages to create a new branch named “gh-pages”.
Add all files in local project to this branch and push them to github again via command:
git push origin gh-pages
Once done, you should find a new branch gh-pages in github now.
Switch to this branch:
Click the hyperlink of html, and you get the following url in browser:
https://github.com/i042416/jerry_test/blob/gh-pages/angular_controller.html
The url for this Angular application hosted in github is:
http://.github.com/<repository_name>/angular_controller.html
As a result in my example, the url is:http://i042416.github.io/jerry_test/angular_controller.html
Test in browser and it works now:
要获取更多Jerry的原创文章,请关注公众号"汪子熙":
相关文章
- 在pycharm中如何新建Python文件?_github下载的python源码项目怎么用
- Github七月最热AI项目榜单还有续集!女娲无限版只能排第3?
- Github 大小写问题
- Github 访问速度很慢的解决方法
- 代码托管你只知道 GitHub?
- GIT推送文件至Github – 学金融的文史哲小生
- Github Copilot 值得购买吗?使用GitHub Copilot进行快速EDA的示例
- 2022 如何在 GitHub 上搭建个人网站(github.io)
- 特斯拉AI总监用300行代码实现“迷你版GPT”,上线GitHub三天收获3.3k星
- 【OpenGL】六、Visual Studio 2019 配置 GitHub ( 提取和拉取简介 | 拉取远程代码 )
- 【错误记录】GitHub 提交报错 ( OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443 )
- GitHub 大热!也许会成为你心中的OCR开源工具NO1!
- GitHub iOS-Top 100 简介详解手机开发
- GitHub 工程师谈 GitHub Pages 服务开发经验
- Github 发布了为桌面应用开发而生的 Electron 1.0 版本
- 开源代码托管平台 GitHub 迎来了期待已久的深色模式
- 对github的中间人攻击