CI/.GitLink/workflows/deploy-prod.yml

26 lines
758 B
YAML

name: Deploy to Production
on:
workflow_dispatch:
inputs:
confirm:
description: '确认要部署到生产环境吗?请输入 deploy'
required: true
type: string
jobs:
deploy:
name: Deploy to Production
runs-on: ubuntu-latest
environment: production
if: github.event_name == 'workflow_dispatch' && github.event.inputs.confirm == 'deploy'
steps:
- uses: actions/checkout@v4
- name: Deploy to Production Server
env:
PROD_API_KEY: ${{ secrets.PROD_API_KEY }}
run: |
echo "Replace with production deploy (kubectl / SSH / platform action)."
echo "Use secrets (e.g. PROD_API_KEY) from the production environment — do not echo secret values."