Skip to content

Python Flask Web App deployed on Google App Engine using Github Actions

Notifications You must be signed in to change notification settings

SKAUL05/cc-python-gae

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

92 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CodeComp Python Player

GitHub commit activity GitHub code size in bytes GitHub last commit Deploy to GAE

Guide to deploy to Google App Engine using Github Actions

  1. Setting up Google Cloud Project (skip if you already have a GCP Project)
  • Go to Google Cloud and click on Get Started for FREE.
  • Login using your gmail account, choose your country, accept terms and conditions and click Continue.
  • In the next step, fill your details, like account type, Name, Address, credit card details, tax information, etc. If you have old Gmail account and all the information is already there it would take it and you might not have to fill all the details.
  • After filling all the details click on Start my free trial.
  • Google will setup your cloud account and in few seconds your Google Cloud Platform account will be ready to start deploying applications on it. It will look like below: Project Setup
  1. Creating Service Account and store credentials in Github
  • Creating Service Account and provide owner access

    • Go to Navigation Menu(Top left Corner) > IAM & Admin > Service Accounts
    • Click on Create Service Account
    • Under Service Account Details provide service account name and description of your choice and click on Create Service Account Details
    • Under Service Account Permissions select Project > Owner Role and click on Continue Service Account Permissions
    • Keep User Access Section unchanged and click on Done
    • On Service Account Page click on Actions hamburger menu of Service Account you just created and Click on Create Key Service Account Create Key
    • Select JSON option and Click on Create. A JSON file will get downloaded on your local system, save it we will need it later* Service Account JSON
  • Add Github Secrets

    • Go to repo that you forked from https://github.com/SKAUL05/cc-python-gae

    • Go to Actions & Click I understand my workflows, go ahead & enable them Update Workflow

    • Go to Settings > Secrets

    • Click on New Secret and add Name as PROJECT_ID and value as Project ID of your GCP Project and click on Add Secret New Secret

    • Again click on New Secret and add Name as ACCOUNT_KEY and value as *contents of json file that you downloaded and click on Add Secret

Now you are good to go, whenever you push anything to your repo's master branch it will get deployed to Google App Engine of your GCP Project using Github Actions.

  • Whenever you push to master branch you can see your Github Action Running like in below image Github Action Running
  • When this Action gets completed you can headover to App Engine URL : https://< GCP_PROJECT_ID >.uc.r.appspot.com/ where GCP_PROJECT_ID is Project ID of your Google Cloud Platform project. Github Action Complete

About

Python Flask Web App deployed on Google App Engine using Github Actions

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published