deploy: Setup SSH #18
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: Deploy on Push | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
types: | |
- closed | |
workflow_dispatch: | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Deploy via SSH | |
uses: appleboy/[email protected] | |
with: | |
host: ${{ secrets.SERVER_HOST }} | |
username: ${{ secrets.SERVER_USER }} | |
key: ${{ secrets.SERVER_SSH_KEY }} | |
port: 22 | |
script: | | |
cd ${{ secrets.PROJECT_PATH }} | |
git pull origin master | |
docker-compose down | |
docker-compose up --build -d |