[英]Update nodejs app on Google cloud app engine from github
I have a nodejs app on Google cloud app engine which I cloned from my GitHub repo, after some time i added some files to my GitHub repo.我在谷歌云应用引擎上有一个 nodejs 应用程序,我从我的 GitHub 存储库中克隆了它,一段时间后我向我的 GitHub 存储库添加了一些文件。 How I update my node app on Google cloud?
我如何在 Google Cloud 上更新我的节点应用程序? Do I have to delete it and clone again or can just add the updated files?
我必须删除它并再次克隆还是可以添加更新的文件?
You can create a build trigger. 您可以创建一个构建触发器。
A build trigger instructs Container Builder to automatically build your image whenever there are changes pushed to the build source.
生成触发器指示Container Builder在将更改推送到生成源时自动生成映像。 You can set a build trigger to re-build your images on any changes to the source repository, or only changes that match certain criteria.
您可以设置构建触发器,以对源存储库进行任何更改,或者仅对符合特定条件的更改进行重新构建映像。
Currently build triggers support 当前构建触发器支持
More details about build triggers can be found here . 有关构建触发器的更多详细信息,请参见此处 。
You can leverage the official GCP App Engine action:您可以利用官方 GCP App Engine 操作:
https://github.com/google-github-actions/deploy-appengine https://github.com/google-github-actions/deploy-appengine
Here's an example GitHub workflow:这是 GitHub 工作流程示例:
# Using https://github.com/google-github-actions/deploy-appengine
# The following example service account permissions could be required for a Typescript project.
# *****
# App Engine Admin
# Cloud Build Editor
# Compute Admin
# Service Account User
# Storage Admin
# *****
name: App Engine Deploy
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the development branch
push:
branches: [master]
# Allows you to run this workflow manually from the Actions tab
# workflow_dispatch:
jobs:
app-deploy:
# needs: build # Job defined in another file.
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- id: "auth"
uses: "google-github-actions/auth@v0"
with:
credentials_json: "${{ secrets.GCP_SA_KEY }}"
- id: "deploy"
uses: "google-github-actions/deploy-appengine@v0.5.0"
- id: "test"
run: 'curl "${{ steps.deploy.outputs.url }}"'
Run the following Gist code snippet to get a proper yml
file:运行以下 Gist 代码片段以获取正确的
yml
文件:
<script src="https://gist.github.com/baharalidurrani/1af42b29f809f0cafeabf47672f8e590.js"></script>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.