Skip to content

Instantly share code, notes, and snippets.

@PaburoTC
Last active March 4, 2021 11:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PaburoTC/c7847bde3cc57c04c0dc16fc55985cf5 to your computer and use it in GitHub Desktop.
Save PaburoTC/c7847bde3cc57c04c0dc16fc55985cf5 to your computer and use it in GitHub Desktop.
name: CD
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch:
jobs:
CD:
name: Continuous Delivery
runs-on: ubuntu-latest
steps:
- name: SSH into production server
uses: appleboy/ssh-action@master
with:
host: domainorip
username: user
key: ${{secrets.CD_SK}}
port: 22
script: |
cd JoboBackend
git pull origin master
git status
python3.9 -m pip install -r requirements.txt
systemctl stop JoboBackend
systemctl start JoboBackend
systemctl status JoboBackend
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment