Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: auto deploy on push issue #917

Draft
wants to merge 3 commits into
base: development
Choose a base branch
from
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 3 additions & 14 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,17 @@
# SSH_JUMPHOST - ssh jump/proxy host though which deployments have to though if UI nodes live on private network.
# SSH_JUMPHOST_USER - username to use to connect to the ssh jump/proxy.
#
# DEPLOY_ENC_KEY - key for decrypting deploymnet ssh key residing in config/
# DEPLOY_ENC_KEY - key for decrypting deployment ssh key residing in config/
# this SSH key is used for accessing jump host, UI nodes, and private github repo.

name: Capistrano Deployment
# Controls when the action will run.
on:
push:
branches:
- stage
- test
# Allows running this workflow manually from the Actions tab
workflow_dispatch:
inputs:
BRANCH:
description: "Branch/tag to deploy"
options:
- stage
- test
- master
default: stage
required: true
environment:
Expand All @@ -39,20 +31,17 @@ on:
- staging
- agroportal
- test
default: stage
default: staging
jobs:
deploy:
runs-on: ubuntu-latest
env:
BUNDLE_WITHOUT: default #install gems required primarely for deployment in order to speed up workflow
BUNDLE_WITHOUT: default # install gems required primarily for deployment in order to speed up workflow
PRIVATE_CONFIG_REPO: ${{ format('[email protected]:{0}.git', secrets.CONFIG_REPO) }}
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: set branch/tag and environment to deploy from inputs
run: |
# workflow_dispatch default input doesn't get set on push so we need to set defaults
# via shell parameter expansion
# https://dev.to/mrmike/github-action-handling-input-default-value-5f2g
USER_INPUT_BRANCH=${{ inputs.branch }}
echo "BRANCH=${USER_INPUT_BRANCH:github.head_ref:-master}" >> $GITHUB_ENV

Expand Down
Loading