Skip to content

πŸͺ’ Merge #15 (semantyk←dev): Fix URL error and add test AuthButton #2

πŸͺ’ Merge #15 (semantyk←dev): Fix URL error and add test AuthButton

πŸͺ’ Merge #15 (semantyk←dev): Fix URL error and add test AuthButton #2

Workflow file for this run

# –––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––
# # `staging.yaml`
# client | Semantyk
#
# Created: Nov 29, 2023
# Modified: Dec 5, 2023
#
# Author(s): Semantyk Team
# Maintainer(s): Daniel Bakas <https://id.danielbakas.com>
#
# Copyright Β© Semantyk 2023. All rights reserved.
# –––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––
name: Staging CI Workflow
on:
push:
branches:
- staging
pull_request:
branches:
- staging
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [ 20.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. Run Tests
- run: pnpm test
name: 5. Run Tests
build:
runs-on: ubuntu-latest
needs: test
strategy:
matrix:
node-version: [ 20.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
- run: pnpm run build
name: 5. Build
deploy:
runs-on: ubuntu-latest
needs: build
steps:
# 1. Repository Checkout
- uses: actions/checkout@v4
name: 1. Repository Checkout
# 2. Cloud SDK Configuration
- uses: google-github-actions/setup-gcloud@v1
name: 2. Cloud SDK Configuration
# 3. Google Cloud Authentication
- uses: google-github-actions/auth@v2
name: 3. Google Cloud Authentication
with:
credentials_json: ${{secrets.GCP_CREDENTIALS}}
# 4. Deploy to Google App Engine
# - Deployment to 'main' Service
- if: github.ref == 'refs/heads/main'
name: 4. 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: 4. Deploy to Staging Service
run: gcloud app deploy app.yaml --project ${{secrets.GCP_PROJECT_ID}} --no-promote