-
-
Notifications
You must be signed in to change notification settings - Fork 8
29 lines (28 loc) · 1.03 KB
/
deploy_nginx.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
name: 🌐 Deploy Nginx
on:
workflow_dispatch:
run-name: Deploy Nginx from '${{ github.ref_name }}' branch
jobs:
deploy_nginx:
runs-on: ubuntu-latest
steps:
- name: Redeploy Nginx
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_nginx.sh -c ${{ secrets.CLOUD_NGINX_CONFIG }} -l ${{ secrets.CLOUD_NGINX_LOGS }}
- 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