Skip to content

Commit

Permalink
Merge pull request #67 from tanhongit/deploy
Browse files Browse the repository at this point in the history
Deploy
  • Loading branch information
tanhongit authored Jul 29, 2023
2 parents ea5c8be + 21d8458 commit d292bc7
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/deploy_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Deploy Server

on:
push:
branches: [ deploy ]

jobs:
shellcheck:
name: Shellcheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Run ShellCheck
uses: ludeeus/action-shellcheck@master

deploy_test:
name: Deploy to Test Server
runs-on: self-hosted
needs: shellcheck
steps:
- name: Deploy to Remote Host
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.REMOTE_HOST }}
username: ${{ secrets.REMOTE_USERNAME }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
port: ${{ secrets.REMOTE_PORT }}
script: |
cd /home/tannp/telegram-bot-github-notify
git reset --hard HEAD
git pull origin deploy
composer update
cd /home/tannp/githubworkrun/telegram-bot-github-notify
git reset --hard HEAD
git pull origin deploy
composer update

0 comments on commit d292bc7

Please sign in to comment.