Manual Deployment of 2025.pythonbrasil.org.br #4
This file contains 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 Deployment of 2025.pythonbrasil.org.br | |
on: | |
workflow_dispatch: | |
jobs: | |
meta: | |
runs-on: ubuntu-latest | |
outputs: | |
STACK_NAME: ${{ steps.vars.outputs.STACK_NAME }} | |
ENVIRONMENT: ${{ steps.vars.outputs.ENVIRONMENT }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set Env Vars | |
id: vars | |
run: | | |
ENVIRONMENT=2025.pythonbrasil.org.br | |
echo "ENVIRONMENT=${ENVIRONMENT}" >> $GITHUB_OUTPUT | |
echo "STACK_NAME=${ENVIRONMENT//./-}" >> $GITHUB_OUTPUT | |
deploy: | |
if: ${{ github.ref == 'refs/heads/main' }} | |
needs: | |
- meta | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Deploy to cluster | |
uses: kitconcept/[email protected] | |
with: | |
registry: "ghcr.io" | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
remote_host: ${{ secrets.DEPLOY_HOST }} | |
remote_port: ${{ secrets.DEPLOY_PORT }} | |
remote_user: ${{ secrets.DEPLOY_USER }} | |
remote_private_key: ${{ secrets.DEPLOY_SSH }} | |
stack_file: devops/stacks/${{ needs.meta.outputs.ENVIRONMENT }}.yml | |
stack_name: ${{ needs.meta.outputs.STACK_NAME }} | |
stack_param: ${{ github.ref_name }} | |
env_file: ${{ secrets.ENV_FILE }} | |
deploy_timeout: 480 |