Skip to content

Deploy Update Server from 'master' branch #2

Deploy Update Server from 'master' branch

Deploy Update Server from 'master' branch #2

name: 🔄 Deploy Update Server
on:
workflow_dispatch:
run-name: Deploy Update Server from '${{ github.ref_name }}' branch
jobs:
pytests:
uses: ./.github/workflows/pytests.yml
deploy_websocket:
needs: pytests
runs-on: ubuntu-latest
steps:
- name: Redeploy Update Server (bin list)
uses: appleboy/ssh-action@v1.2.0
with:
host: ${{ secrets.CLOUD_SERVER_IP }}
username: ${{ secrets.CLOUD_SERVER_USER }}
key: ${{ secrets.CLOUD_SERVER_SSH_KEY }}
script: |
cd /root/ukraine_alarm_map/deploy/
git fetch --all
git switch ${{ github.ref_name }}
git pull
bash redeploy_update_server.sh -s '/root/ukraine_alarm_map/bin' -sb '/root/ukraine_alarm_map/bin_beta' -m ${{ secrets.CLOUD_MEMCACHED_HOST }}
- name: Clear unused images
uses: appleboy/ssh-action@v1.2.0
with:
host: ${{ secrets.CLOUD_SERVER_IP }}
username: ${{ secrets.CLOUD_SERVER_USER }}
key: ${{ secrets.CLOUD_SERVER_SSH_KEY }}
script: |
docker image prune -f