π¨ Style: Fix footer text #50
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
# βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ | |
# # `staging.yaml` | |
# @organization: Semantyk | |
# @project: Client | |
# | |
# @file: This file contains the GitHub Actions workflow for the staging CI. | |
# | |
# @created: Nov 29, 2023 | |
# @modified: Sep 18,2024 | |
# | |
# @author: Semantyk Team | |
# @maintainer: Daniel Bakas <https://id.danielbakas.com> | |
# | |
# @copyright: Copyright Β© Semantyk 2024. All rights reserved. | |
# βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ | |
name: Staging CI Workflow | |
on: | |
push: | |
branches: | |
- staging | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [ 21.x ] | |
steps: | |
# 1. Checkout the Repository | |
- uses: actions/checkout@v4 | |
name: 1. Repository Checkout | |
# 2. Setup pnpm | |
- uses: pnpm/action-setup@v2 | |
name: 2. Setup pnpm | |
with: | |
version: 8 | |
# 3. Setup Node.js | |
- uses: actions/setup-node@v4 | |
name: 3. Setup Node.js (v${{ matrix.node-version }}) | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: 'pnpm' | |
# 4. Install Dependencies | |
- run: pnpm install | |
name: 4. Install Dependencies | |
# 5. Build the Project | |
- name: 5. Build the Project | |
run: pnpm run build | |
# 5. Cloud SDK Configuration | |
- uses: google-github-actions/setup-gcloud@v1 | |
name: 5. Cloud SDK Configuration | |
# 6. Google Cloud Authentication | |
- uses: google-github-actions/auth@v2 | |
name: 6. Google Cloud Authentication | |
with: | |
credentials_json: ${{secrets.GCP_CREDENTIALS}} | |
# 7. Deploy to Google App Engine | |
# - Deployment to 'main' Service | |
- if: github.ref == 'refs/heads/main' | |
name: 7. Deployment to 'main' Service | |
run: gcloud app deploy app.yaml --project ${{secrets.GCP_PROJECT_ID}} --promote | |
# - Deployment to 'staging' service | |
- if: github.ref == 'refs/heads/staging' | |
name: 7. Deployment to 'staging' Service | |
# TODO: Change to --no-promote | |
run: gcloud app deploy app.yaml --project ${{secrets.GCP_PROJECT_ID}} --promote |