Manual Production Deployment #63
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |