-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (31 loc) · 1.02 KB
/
hyva-stage.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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
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: Set Default Value if Not Provided
run: echo "custom_branch=${{ github.event.inputs.current-branch || '' }}" >> $GITHUB_ENV
- 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