-
Notifications
You must be signed in to change notification settings - Fork 9
39 lines (36 loc) · 1.08 KB
/
deploy-production.yml
File metadata and controls
39 lines (36 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: Deploy Production
on:
workflow_dispatch:
inputs:
branch:
description: "Branch to deploy (default: main)"
required: false
default: "main"
type: string
confirm:
description: 'Type "DEPLOY" to confirm production deployment'
required: true
type: string
jobs:
validate-input:
name: Validate Deployment Input
runs-on: ubuntu-latest
steps:
- name: Validate confirmation
run: |
if [[ "${{ github.event.inputs.confirm }}" != "DEPLOY" ]]; then
echo "❌ Confirmation failed. You must type 'DEPLOY' exactly to proceed."
exit 1
fi
echo "✅ Deployment confirmed"
deploy-production:
name: Deploy Production
needs: validate-input
uses: ./.github/workflows/.deploy-reusable.yml
with:
environment: "production"
build_mode: "production"
branch: ${{ github.event.inputs.branch }}
secrets:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}