hyva-stage-deploy-test #5
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: hyva-stage-deploy-test | |
on: | |
workflow_dispatch: | |
inputs: | |
current-branch: | |
description: "Please give a custom branch to deploy" | |
required: false | |
pull_request: | |
branches: | |
- hyva-stage | |
types: | |
- closed | |
env: | |
CUSTOM_BRANCH: ${{ github.event.inputs.current-branch || '' }} | |
jobs: | |
deployment-job: | |
name: Hyva Stage Deploy | |
if: github.event.pull_request.merged == true || github.event_name == 'workflow_dispatch' | |
runs-on: ubuntu-latest | |
steps: | |
- name: SSH into the machine and run some commands | |
uses: appleboy/ssh-action@master | |
with: | |
host: 3.221.225.1 | |
username: sigosigns | |
key: ${{ secrets.SH_SSH_BLD }} | |
port: 22 | |
script: | | |
cd /home/sigosigns/build/capistrano | |
echo "Running deployment script on the server" | |
CUSTOM_BRANCH=$CUSTOM_BRANCH cap staging deploy |