-
Notifications
You must be signed in to change notification settings - Fork 3
52 lines (47 loc) · 1.8 KB
/
production-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
46
47
48
49
50
51
52
name: production-deploy
on:
push:
branches: ["production"]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: 'echo "$configuration" > configuration.ts'
shell: bash
env:
configuration: ${{secrets.PRODUCTION_SERVER_CONFIG}}
- name: Copy server configuration file to remote
uses: garygrossgarten/github-action-scp@release
with:
local: configuration.ts
remote: cbnu_alrami_production/packages/server/src/config/configuration.ts
host: ${{ secrets.DEV_SERVER_SSH_HOST }}
username: ${{ secrets.DEV_SERVER_SSH_USER }}
password: ${{ secrets.DEV_SERVER_SSH_PASSWORD }}
port: ${{ secrets.DEV_SERVER_SSH_PORT }}
- run: 'echo "$configuration" > configuration.ts'
shell: bash
env:
configuration: ${{secrets.PRODUCTION_SCRAPER_CONFIG}}
- name: Copy scraper configuration file to remote
uses: garygrossgarten/github-action-scp@release
with:
local: configuration.ts
remote: cbnu_alrami_production/packages/scraper/src/config/configuration.ts
host: ${{ secrets.DEV_SERVER_SSH_HOST }}
username: ${{ secrets.DEV_SERVER_SSH_USER }}
password: ${{ secrets.DEV_SERVER_SSH_PASSWORD }}
port: ${{ secrets.DEV_SERVER_SSH_PORT }}
- name: run deploy
uses: appleboy/[email protected]
with:
host: ${{ secrets.DEV_SERVER_SSH_HOST }}
username: ${{ secrets.DEV_SERVER_SSH_USER }}
password: ${{ secrets.DEV_SERVER_SSH_PASSWORD }}
port: ${{ secrets.DEV_SERVER_SSH_PORT }}
script: |
export PATH="/usr/local/bin:$PATH"
cd cbnu_alrami_production
git pull
sh ./deploy_production.sh