Merge pull request #173 from colbsa/development #169
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish Master Branch to Web | |
on: | |
push: | |
branches: [ master ] | |
jobs: | |
prod-deploy: | |
name: Deploys Master Branch to Production Website | |
runs-on: ubuntu-latest | |
steps: | |
- name: executing remote ssh commands using key | |
uses: appleboy/ssh-action@master | |
env: | |
PRODDIR: ${{ secrets.PRODDIR }} | |
with: | |
host: ${{ secrets.PRODHOST }} | |
username: ${{ secrets.USERNAME }} | |
key: ${{ secrets.PRODKEY }} | |
port: ${{ secrets.PORT }} | |
envs: PRODDIR | |
script_stop: true | |
script: | | |
cd $PRODDIR | |
sudo -u www-data git reset --hard | |
sudo -u www-data git pull |