Skip to content

Deploy main to Frontend nonprod #296

Deploy main to Frontend nonprod

Deploy main to Frontend nonprod #296

Workflow file for this run

name: Deploy Frontend
run-name: Deploy ${{ github.ref_name }} to Frontend ${{ inputs.environment || (github.event_name == 'release' && 'prod') || 'nonprod' }}
on:
push:
branches:
- "main"
paths:
- "frontend/**"
release:
types: [published]
workflow_dispatch:
inputs:
environment:
description: "target environment"
required: true
default: "dev"
type: choice
options:
- dev
- staging
- prod
jobs:
frontend-checks:
name: Run Frontend Checks
uses: ./.github/workflows/ci-frontend.yml
vulnerability-scans:
name: Vulnerability Scans
uses: ./.github/workflows/vulnerability-scans.yml
with:
app_name: frontend
deploy:
name: Deploy
needs: [frontend-checks, vulnerability-scans]
uses: ./.github/workflows/deploy.yml
strategy:
max-parallel: 1
fail-fast: false
matrix:
envs: ${{ github.event_name == 'release' && fromJSON('["prod"]') || github.ref_name == 'main' && fromJSON('["dev", "staging"]') || fromJSON('["dev"]') }}
with:
app_name: "frontend"
environment: ${{ matrix.envs }}