Skip to content

Instantly share code, notes, and snippets.

@omergulen
Created April 2, 2024 07:47
Show Gist options
  • Select an option

  • Save omergulen/2ff4bc40662b7134698b16e0a72040d5 to your computer and use it in GitHub Desktop.

Select an option

Save omergulen/2ff4bc40662b7134698b16e0a72040d5 to your computer and use it in GitHub Desktop.
SSH Deploy
name: Node CI
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: SSH Deploy
uses: easingthemes/ssh-deploy@v4.1.8
env:
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
REMOTE_HOST: ${{ secrets.REMOTE_HOST }}
REMOTE_USER: ${{ secrets.REMOTE_USER }}
TARGET: '/root/threads-circle/'
ARGS: '-rlgoDzvc -i'
SOURCE: '/'
EXCLUDE: '/node_modules/'
SCRIPT_AFTER: |
cd /root/threads-circle/
yarn --frozen-lockfile
sudo pm2 restart all --cron-restart="0 * * * *"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment