Skip to content

deploy

deploy #2

Workflow file for this run

name: deploy
on:
workflow_run:
workflows: [build]
types: [completed]
branches: [master]
jobs:
deploy:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- name: Install SSH key
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.SSH_PRIVATE_KEY }}
known_hosts: ${{ secrets.SSH_KNOWN_HOSTS }}
- name: Connect and update
run: |
ssh ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }} -p${{ secrets.SSH_PORT }} \
"cd ${{ secrets.SSH_WORKING_DIR }} && git pull && bundle install && sudo systemctl restart rubies"