Reputation: 1961
I have a github repository connected to my app engine project. I followed this question.
I need an option to do an automatic pull from remote repository on app engine when I push to master.
I already have a php file. Maybe I must delete this file before connection?
Thank you.
Upvotes: 1
Views: 700
Reputation: 1246
You can leverage the official GCP App Engine action:
https://github.com/google-github-actions/deploy-appengine
Here's an example GitHub workflow:
# 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/[email protected]"
- id: "test"
run: 'curl "${{ steps.deploy.outputs.url }}"'
Run the following Gist code snippet to get a proper yml
file:
<script src="https://gist.github.com/baharalidurrani/1af42b29f809f0cafeabf47672f8e590.js"></script>
Upvotes: 0
Reputation: 5526
Automatically deploying from a git-repository was discontinued a while ago! The way to go now is hosting your own continuous delivery-system, i.e. Jenkins on a Compute Engine instance. More information here: https://stackoverflow.com/a/38385874/198996
Upvotes: 1