Merge pull request #28 from MRR-Group/KacperWalenga-patch-1 #4
This file contains hidden or 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: Deploy production | |
| on: | |
| push: | |
| branches: ["production"] | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Run remote deploy via SSH | |
| uses: appleboy/ssh-action@v1 | |
| with: | |
| host: ${{ secrets.SERVER_HOST }} | |
| username: ${{ secrets.USERNAME }} | |
| key: ${{ secrets.SSH_PRIVATE_KEY }} | |
| port: 22 | |
| script: | | |
| set -e | |
| cd ${{ secrets.PATH_TO_REPO }} | |
| git fetch --all | |
| git reset --hard origin/production | |
| task init | |
| task run |