-
Notifications
You must be signed in to change notification settings - Fork 0
31 lines (27 loc) · 789 Bytes
/
deploy.yml
File metadata and controls
31 lines (27 loc) · 789 Bytes
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
30
name: Redeploy dailys api
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Update config
run: 'echo "$CONFIG_FILE" > config.json'
env:
CONFIG_FILE: ${{ secrets.DEPLOYED_CONFIG }}
- name: Redeploying on remote server
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORD }}
envs: GITHUB_REF
script: |
cd ${{ secrets.REMOTE_PATH }}
echo ${GITHUB_REF##*/}
docker-compose down
git pull
git checkout ${GITHUB_REF##*/}
git pull
docker-compose up --build -d