-
Notifications
You must be signed in to change notification settings - Fork 33
46 lines (39 loc) · 1.37 KB
/
deploy-prod.yaml
File metadata and controls
46 lines (39 loc) · 1.37 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
40
41
42
43
44
45
46
name: Manual Production Deployment
on:
workflow_dispatch:
inputs:
confirmProdDeploy:
type: boolean
description: "Confirm deployment to production"
required: true
default: false
deployTag:
type: string
description: "Tag to deploy to production (optional)"
required: false
jobs:
deploy:
runs-on: ubuntu-latest
env:
AWS_REGION: eu-west-1
steps:
- name: Echo Inputs
run: |
echo "Confirm Production Deploy: ${{ github.event.inputs.confirmProdDeploy }}"
echo "Deploy Tag: ${{ github.event.inputs.deployTag }}"
- name: Checkout code
uses: actions/checkout@v4.1.1
- name: Execute Production Deployment Script
run: bash deploy/deploy_prod.sh ${{ github.event.inputs.deployTag }}
env:
CONFIRM_DEPLOY: ${{ github.event.inputs.confirmProdDeploy }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: ${{ env.AWS_REGION }}
- name: Commit and push .prod-versions
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add .prod-versions
git commit -m "Update production versions: ${{ github.event.inputs.deployTag || 'auto-detected' }}"
git push