Skip to content

Commit

Permalink
Introduce deploy action (#210)
Browse files Browse the repository at this point in the history
  • Loading branch information
epistrephein authored Oct 6, 2023
1 parent 22640e2 commit a27aae9
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
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"

0 comments on commit a27aae9

Please sign in to comment.