Skip to content

change branch from main to dev in deploy.yml #12

change branch from main to dev in deploy.yml

change branch from main to dev in deploy.yml #12

Workflow file for this run

name: Deployment on dev server
on:
push:
branches:
- dev
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: pull code and restart service
uses: appleboy/ssh-action@master
env:
SERVER_WORKDIR: ${{secrets.SERVER_WORKDIR}}
with:
host: ${{secrets.SERVER_HOST}}
username: ${{secrets.SERVER_USERNAME}}
key: ${{secrets.SERVER_KEY}}
envs: SERVER_WORKDIR
script_stop: true
script: |
cd $SERVER_WORKDIR
echo "pulling code from remote..."
git checkout .
git pull github main
echo "pulling completed successfully."
kill -HUP 20504
echo "service restarted successfully."