-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
π§Ή Chore: Add deployment CI workflow
- Loading branch information
1 parent
80f6419
commit b24160a
Showing
1 changed file
with
45 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ | ||
# # `deploy.yaml` | ||
# client | Semantyk | ||
# | ||
# Created: Nov 29, 2023 | ||
# Modified: Nov 29, 2023 | ||
# | ||
# Author(s): Semantyk Team | ||
# Maintainer(s): Daniel Bakas <https://id.danielbakas.com> | ||
# | ||
# Copyright Β© Semantyk 2023. All rights reserved. | ||
# βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ | ||
|
||
name: Deploy to Google App Engine | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- staging | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
# 1. Checkout the Repository | ||
- name: Repository Checkout | ||
uses: actions/checkout@v4 | ||
# 2. Setup Google Cloud SDK | ||
- name: Cloud SDK Configuration | ||
uses: google-github-actions/setup-gcloud@v1 | ||
# 3. Authenticate with Google Cloud | ||
- name: GCP Authentication | ||
uses: google-github-actions/auth@v1 | ||
with: | ||
credentials_json: ${{secrets.GCP_CREDENTIALS}} | ||
# 4. Deploy to Google App Engine | ||
# Deployment to 'main' service | ||
- name: Deploy to Main Service | ||
if: github.ref == 'refs/heads/main' | ||
run: gcloud app deploy app.yaml --project ${{secrets.GCP_PROJECT_ID}} --promote --version main | ||
# Deployment to 'staging' service | ||
- name: Deploy to Staging Service | ||
if: github.ref == 'refs/heads/staging' | ||
run: gcloud app deploy app.yaml --project ${{secrets.GCP_PROJECT_ID}} --no-promote --version staging |