added monitoring #3
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 AzureVM | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v2 | |
- name: Deploy to AzureVM | |
uses: appleboy/ssh-action@master | |
with: | |
host: ${{ secrets.HOST }} | |
username: ${{ secrets.USERNAME }} | |
key: ${{ secrets.KEY }} | |
script: | | |
cd /home/azureuser/server | |
sudo rm -rf Worker | |
git clone https://github.com/BharatSeva/Worker.git | |
sudo docker rm -f worker_service || true | |
sudo docker-compose up -d --build | |
# give permission to grafana and prometheus | |
sudo chmod -R 775 Worker/ |