-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (37 loc) · 1.21 KB
/
deploy.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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: Deploy to remote server
on:
workflow_run:
workflows: [ Build and Publish Docker Image ]
types:
- completed
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
name: Check out code
- name: Add environment variables to .env
run: |
echo '''${{ secrets.SCRAPY_WEB_CREDENTIALS }}''' >> .env
- name: Copy files into the server
uses: appleboy/scp-action@master
with:
host: ${{ secrets.HOST_IP_ADDRESS }}
USERNAME: ${{ secrets.HOST_USER_NAME }}
PASSWORD: ${{ secrets.HOST_PASSWORD }}
TIMEOUT: 5m
COMMAND_TIMEOUT: 5m
source: "."
target: "/Projects/multilingual_drc_news_chatbot"
- uses: appleboy/ssh-action@master
name: Executing remote command
with:
host: ${{ secrets.HOST_IP_ADDRESS }}
USERNAME: ${{ secrets.HOST_USER_NAME }}
PASSWORD: ${{ secrets.HOST_PASSWORD }}
TIMEOUT: 30m
COMMAND_TIMEOUT: 30m
script: |
cd /Projects/multilingual_drc_news_chatbot
docker login --username ${{ secrets.DOCKERHUB_USERNAME }} --password ${{ secrets.DOCKERHUB_TOKEN }}
docker-compose up --build -d