Skip to content

Instantly share code, notes, and snippets.

@Jabster28
Created January 25, 2021 15:30
Show Gist options
  • Save Jabster28/1f7caec64e12361509e92307cb4e2d2c to your computer and use it in GitHub Desktop.
Save Jabster28/1f7caec64e12361509e92307cb4e2d2c to your computer and use it in GitHub Desktop.
name: CI
on: [push]
jobs:
deploy:
if: github.ref == 'refs/heads/master'
runs-on: [ubuntu-latest]
steps:
- uses: actions/checkout@v1
- name: Push to server
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.SERVER_IP }}
username: ${{ secrets.SERVER_USERNAME }}
password: ${{ secrets.SERVER_PASSWORD }}
script: cd ${{ secrets.PROJECT_PATH }} && git pull && pm2 restart index.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment