Skip to content

Deploy 1782/merge to API dev #94

Deploy 1782/merge to API dev

Deploy 1782/merge to API dev #94

Workflow file for this run

name: Deploy API
# Need to set a default value for when the workflow is triggered from a git push
# which bypasses the default configuration for inputs
run-name: Deploy ${{ github.ref_name }} to API ${{ inputs.environment || (github.event_name == 'release' && 'prod') || 'dev' }}
on:
# for testing purposes
pull_request:
paths:
- ".github/workflows/cd-api.yml"
push:
branches:
- "main"
paths:
- "api/**"
release:
types: [published]
workflow_dispatch:
inputs:
environment:
description: "target environment"
required: true
default: "dev"
type: choice
options:
- dev
- prod
jobs:
api-checks:
name: Run API Checks
uses: ./.github/workflows/ci-api.yml
deploy:
name: Deploy
needs: api-checks
uses: ./.github/workflows/deploy.yml
with:
app_name: "api"
environment: ${{ inputs.environment || (github.event_name == 'release' && 'prod') || 'dev' }}