deploy to server #9
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: | |
workflow_run: | |
workflows: ['Push to GHCR'] | |
types: [completed] | |
branches: | |
- main | |
jobs: | |
build: | |
name: Deploy | |
runs-on: ubuntu-latest | |
steps: | |
- name: pull image and restart service | |
uses: appleboy/ssh-action@v1.0.3 | |
with: | |
host: ${{ secrets.HOST }} | |
username: ${{ secrets.USERNAME }} | |
key: ${{ secrets.KEY }} | |
port: ${{ secrets.PORT }} | |
script: | | |
docker pull ghcr.io/danerieber/harmon-react:latest | |
sudo systemctl restart docker-harmon-react.service |