Skip to content

Deploy Python Firebase Functions #8

Deploy Python Firebase Functions

Deploy Python Firebase Functions #8

name: Deploy Python Firebase Functions
on:
push:
branches:
- add-deploy-workflow
workflow_dispatch:
inputs:
environment:
description: 'Environment to deploy to'
required: true
default: 'staging'
type: choice
options:
- staging
- prod
confirm_prod:
description: 'Type "yes" to confirm production deployment'
required: false
type: string
permissions:
contents: read
concurrency:
group: deploy-${{ github.ref }}
cancel-in-progress: false
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Validate production deployment
if: ${{ github.event.inputs.environment == 'prod' }}
run: |
if [[ "${{ github.event.inputs.confirm_prod }}" != "yes" ]]; then
echo "::error::Production deployment requires explicit confirmation. Please type 'yes' in the confirm_prod field."
exit 1
fi
- name: Deploy Firebase Functions
uses: ./
with:
environment: ${{ github.event.inputs.environment }}
project_id: ${{ github.event.inputs.environment == 'prod' && 'hello-wisdom-prod' || 'hello-wisdom-staging' }}