From eb6db25458492c58fbda5882c0dcdf77907d0f75 Mon Sep 17 00:00:00 2001 From: v00g100skr Date: Fri, 26 Jan 2024 16:04:54 +0200 Subject: [PATCH] deploy --- .github/workflows/deploy_server.yml | 34 +++++++++++++++++++++-------- 1 file changed, 25 insertions(+), 9 deletions(-) diff --git a/.github/workflows/deploy_server.yml b/.github/workflows/deploy_server.yml index 54de2cc..e87ead2 100644 --- a/.github/workflows/deploy_server.yml +++ b/.github/workflows/deploy_server.yml @@ -10,6 +10,10 @@ on: type: boolean default: false description: TCP Sockets + redeploy_web_sockets: + type: boolean + default: false + description: WebSockets redeploy_update_server: type: boolean default: false @@ -60,8 +64,8 @@ jobs: git fetch --all git checkout ${{ github.ref_name }} bash redeploy_tcp_server.sh -m ${{ secrets.MEMCACHED_HOST }} - - name: Redeploy Update Server (bin list) - if: ${{ inputs.redeploy_update_server || inputs.redeploy_all }} + - name: Redeploy WebSockets + if: ${{ inputs.redeploy_web_sockets || inputs.redeploy_all }} uses: appleboy/ssh-action@v1.0.3 with: host: ${{ secrets.SERVER_IP }} @@ -71,9 +75,9 @@ jobs: cd /root/ukraine_alarm_map/deploy/ git fetch --all git checkout ${{ github.ref_name }} - bash redeploy_update_server.sh -s '/root/ukraine_alarm_map/bin' - - name: Redeploy Web Server - if: ${{ inputs.redeploy_web_server || inputs.redeploy_all }} + bash redeploy_websocket_server.sh -m ${{ secrets.MEMCACHED_HOST }} + - name: Redeploy Update Server (bin list) + if: ${{ inputs.redeploy_update_server || inputs.redeploy_all }} uses: appleboy/ssh-action@v1.0.3 with: host: ${{ secrets.SERVER_IP }} @@ -83,9 +87,9 @@ jobs: cd /root/ukraine_alarm_map/deploy/ git fetch --all git checkout ${{ github.ref_name }} - bash redeploy_web_server.sh -d ${{ secrets.WEB_TOKEN }} -p 80 -m ${{ secrets.MEMCACHED_HOST }} - - name: Redeploy Alerts - if: ${{ inputs.redeploy_alerts || inputs.redeploy_all }} + bash redeploy_update_server.sh -s '/root/ukraine_alarm_map/bin' + - name: Redeploy Web Server + if: ${{ inputs.redeploy_web_server || inputs.redeploy_all }} uses: appleboy/ssh-action@v1.0.3 with: host: ${{ secrets.SERVER_IP }} @@ -95,7 +99,7 @@ jobs: cd /root/ukraine_alarm_map/deploy/ git fetch --all git checkout ${{ github.ref_name }} - bash redeploy_alerts.sh -a ${{ secrets.AIR_ALARM_API_KEY }} -p ${{ inputs.polling-interval }} -m ${{ secrets.MEMCACHED_HOST }} + bash redeploy_web_server.sh -d ${{ secrets.WEB_TOKEN }} -p 80 -m ${{ secrets.MEMCACHED_HOST }} - name: Redeploy Weather if: ${{ inputs.redeploy_weather || inputs.redeploy_all }} uses: appleboy/ssh-action@v1.0.3 @@ -144,3 +148,15 @@ jobs: git fetch --all git checkout ${{ github.ref_name }} bash redeploy_explosions.sh -e ${{ secrets.ETRYVOGA_HOST }} -m ${{ secrets.MEMCACHED_HOST }} + - name: Redeploy Alerts + if: ${{ inputs.redeploy_alerts || inputs.redeploy_all }} + uses: appleboy/ssh-action@v1.0.3 + with: + host: ${{ secrets.SERVER_IP }} + username: ${{ secrets.SERVER_SSH_USER }} + password: ${{ secrets.SERVER_SSH_PASSWORD }} + script: | + cd /root/ukraine_alarm_map/deploy/ + git fetch --all + git checkout ${{ github.ref_name }} + bash redeploy_alerts.sh -a ${{ secrets.AIR_ALARM_API_KEY }} -p ${{ inputs.polling-interval }} -m ${{ secrets.MEMCACHED_HOST }}