-
Notifications
You must be signed in to change notification settings - Fork 2
38 lines (33 loc) · 988 Bytes
/
cd-prod.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
name: FPLM Deploy Prod
on:
push:
branches:
- master
pull_request: {}
jobs:
stage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install SSH Key
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.PROD_DEPLOY_KEY }}
known_hosts: ${{ secrets.KNOWN_HOSTS }}
- name: Envs
run: echo "$PROD_VARS" >> local.env
shell: bash
env:
PROD_VARS : ${{secrets.PROD_VARS}}
- name: Deploy Prod
shell: bash
run: rsync -avz ./ jenkins@ec2-35-183-34-28.ca-central-1.compute.amazonaws.com:/home/jenkins/workspace/map/fplm-prod/
- name: Run Prod
uses: appleboy/ssh-action@master
with:
host: "ec2-35-183-34-28.ca-central-1.compute.amazonaws.com"
username: jenkins
key: ${{ secrets.PROD_DEPLOY_KEY }}
script: |
cd /home/jenkins/workspace/map/fplm-prod/
./prod.sh