Skip to content

Deploy to Production #68

Deploy to Production

Deploy to Production #68

name: Deploy to Production
on:
workflow_dispatch:
inputs:
build_number:
description: 'Build number to deploy (leave empty for latest)'
required: false
type: string
jobs:
deploy-production:
if: github.ref == 'refs/heads/main'
name: Deploy to Production
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: 'Docker Stack Deploy'
uses: jtwebman/stack-deploy-action@proposed_registry_login_change
env:
IMAGE_TAG: ${{ inputs.build_number || 'latest' }}
DOMAIN: 'tools.zidartcc.org'
APP_PORT: 3000
APP_NAME: 'controller-tools'
BUILD_NUMBER: ${{ inputs.build_number || 'latest' }}
with:
host: ${{ secrets.DEPLOY_HOST }}
user: ${{ secrets.DEPLOY_USER }}
ssh_key: ${{ secrets.DEPLOY_PRIVATE_KEY }}
file: 'docker-compose.yaml'
name: 'controller-tools'
registry_auth: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin