Added deploy.yml
This commit is contained in:
parent
9a221a1427
commit
44d42f88f7
1 changed files with 26 additions and 0 deletions
26
.github/workflows/deploy.yml
vendored
Normal file
26
.github/workflows/deploy.yml
vendored
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
name: Deploy to VM
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [master]
|
||||||
|
pull_request:
|
||||||
|
branches: [master]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Install SSH key
|
||||||
|
uses: shimataro/ssh-key-action@6f350ca8484d8d55c2e361e74d17e638dabe713a
|
||||||
|
with:
|
||||||
|
key: ${{ secrets.SSH_KEY }}
|
||||||
|
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
||||||
|
|
||||||
|
- name: Copy files to VM
|
||||||
|
run: rsync -chav --delete ./ ${{ secrets.USER_AND_IP }}:/var/www/Chat/tmp
|
||||||
|
|
||||||
|
- name: Execute remote command
|
||||||
|
run: ssh ${{ secrets.USER_AND_IP }} sudo /var/www/deploy-node.sh chat.henryhiles.com Chat 3000
|
Reference in a new issue