您可以为 github 页面部署添加构建步骤吗?
Can you add a build step for github pages deployment?
我想使用我的存储库的 master 分支作为我的 github 页面的来源。我需要一个构建步骤 (ng build --prod --aot
) 来生成需要显示的 index.html
文件。我也不希望对生成的文件进行版本控制。有没有办法单独使用 Github 或与 Travis CI 或任何其他工具一起使用?
看起来 travis deployment system 到 github 页面正是您所需要的:
Deploying to GitHub Pages uses git push --force
to overwrite the history on the target branch, so make sure you only deploy to a branch used for that specific purpose, such as gh-pages
.
您不能在 github 端向构建过程添加步骤。获取您的存储库并将其变成可服务内容的过程只能通过配置文件页面上的设置来控制。
最后,如果索引文件不是 jekyll,它将按存储库中的原样提供。
您可以做的一件事是拥有两个存储库 - 一个 "source" 和一个是提供的实际页面。这至少会将 index.html 文件保留在源存储库之外。
我想使用我的存储库的 master 分支作为我的 github 页面的来源。我需要一个构建步骤 (ng build --prod --aot
) 来生成需要显示的 index.html
文件。我也不希望对生成的文件进行版本控制。有没有办法单独使用 Github 或与 Travis CI 或任何其他工具一起使用?
看起来 travis deployment system 到 github 页面正是您所需要的:
Deploying to GitHub Pages uses
git push --force
to overwrite the history on the target branch, so make sure you only deploy to a branch used for that specific purpose, such asgh-pages
.
您不能在 github 端向构建过程添加步骤。获取您的存储库并将其变成可服务内容的过程只能通过配置文件页面上的设置来控制。
最后,如果索引文件不是 jekyll,它将按存储库中的原样提供。
您可以做的一件事是拥有两个存储库 - 一个 "source" 和一个是提供的实际页面。这至少会将 index.html 文件保留在源存储库之外。