简体   繁体   English

Ember 项目到 Github 页面

[英]Ember project to Github Pages

I just finished making an ember project (super simple nothing huge) You can check it out < here >我刚刚完成了一个 ember 项目(超级简单没什么大不了的)你可以看看 <这里>

but I am trying to deploy it to make it into a website on github pages and there is hardly any documentation out there and was wondering if I could get some help.但我正在尝试将其部署到 github 页面上的网站中,并且几乎没有任何文档,我想知道是否可以得到一些帮助。 Thank you谢谢

There are three strategies to do so these days:现在有三种策略可以做到这一点:

  1. Ember CLI Deploy is a famous deployment pipeline for Ember.js applications. Ember CLI Deploy是 Ember.js 应用程序的著名部署管道。 The ember-cli-deploy-git plugin adds support for GitHub Pages as deployment target. ember-cli-deploy-git插件添加了对 GitHub 页面作为部署目标的支持。 There is an additional plugin ember-cli-deploy-git-ci , which adds support for deployments from a CI pipeline on top of that one.还有一个额外的插件ember-cli-deploy-git-ci ,它增加了对来自 CI 管道的部署的支持。
  2. The Ember addon ember-cli-github-pages adds a command to Ember CLI, which deploys the project to GitHub Pages. Ember 插件ember-cli-github-pages向 Ember CLI 添加了一个命令,该命令将项目部署到 GitHub 页面。 It's similar to the Ember CLI Deploy pipeline but working as a standalone solution.它类似于 Ember CLI 部署管道,但作为一个独立的解决方案工作。
  3. You can deploy to GitHub Pages from GitHub actions .您可以从GitHub 操作部署到 GitHub 页面。 There are different Actions available in GitHub Marketplace to do so. GitHub Marketplace 中提供了不同的操作来执行此操作。 The most famous one if comparing by stars is the GitHub Pages action .如果按星级进行比较,最著名的是GitHub Pages 动作 To use it you would need to build your Ember project as usual and set the publish_dir option of the action to ./dist .要使用它,您需要像往常一样构建您的 Ember 项目,并将操作的publish_dir选项设置为./dist Ember CLI stores the build output by default in that folder. Ember CLI 默认将构建 output 存储在该文件夹中。

It's up to you which approach you use.这取决于您使用哪种方法。 All of them are common in the ecosystem.所有这些在生态系统中都很常见。 Maybe some hints to decide:也许有一些提示可以决定:

  • If running the CI on GitHub actions, I would recommend to also us it for deployment.如果在 GitHub 操作上运行 CI,我建议也将其用于部署。
  • If using Ember CLI Deploy in that project already for deployment to another environment, I would recommend to use it for deployments to GitHub Pages as well.如果已经在该项目中使用 Ember CLI Deploy 部署到另一个环境,我建议也将其用于部署到 GitHub 页面。
  • If not using a CI at all and just looking for a quick solution, I would go with ember-cli-github-pages as this is the simplest one.如果根本不使用 CI 并且只是寻找一个快速的解决方案,我会 go 与ember-cli-github-pages因为这是最简单的一个。
  • If this is a playground project and you want to learn more about the common deployment process for Ember applications, I would go with Ember CLI Deploy.如果这是一个游乐场项目,并且您想了解有关 Ember 应用程序的常见部署过程的更多信息,我会选择 go 和 Ember CLI Deploy。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM