Merge pull request #145 from nikkhvat/142-add-redux-toolkit #78
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 to Server | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Setup SSH and known_hosts | |
run: | | |
mkdir -p ~/.ssh | |
echo "${{ secrets.SERVER_SSH_KEY }}" > ~/.ssh/id_rsa | |
chmod 600 ~/.ssh/id_rsa | |
ssh-keyscan ${{ secrets.SERVER_IP }} >> ~/.ssh/known_hosts | |
- name: Deploy to Server | |
run: | | |
ssh ${{ secrets.SERVER_USER }}@${{ secrets.SERVER_IP }} "cd /home/nikkhvat/gostat; git pull; make stop; make start" | |
env: | |
SSH_PRIVATE_KEY: ${{ secrets.SERVER_SSH_KEY }} |