forked from openMF/community-app
-
Notifications
You must be signed in to change notification settings - Fork 4
55 lines (42 loc) · 1.44 KB
/
demo_deployment.yaml
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
53
54
55
name: Build for demo
on:
push:
branches: [ demo ]
jobs:
deploy:
name: Deploy archive to ubuntu server
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
- uses: kamiazya/setup-graphviz@v1
with:
graphviz-version: '2.44.1'
- name: Setup Node.js and Ruby
uses: actions/setup-node@v3
with:
node-version: '16.13.1'
- uses: actions/checkout@v3
- uses: ruby/setup-ruby@ec02537da5712d66d4d50a0f33b7eb52773b5ed1
with:
ruby-version: '2.7'
- name: Install Bower dependencies
run: |
npm install -g bower
bower --allow-root install
- name: Build and archive app package
run: |
npm install --legacy-peer-deps
npm install -g grunt-cli
bundle install
grunt prod
- name: Copy file using SCP
run: |
HOST=${{ secrets.FITER_DEMO_SERVER_URL }}
USER=${{ secrets.FITER_DEMO_SERVER_USERNAME }}
SOURCE_FILE='dist/community-app/*'
DESTINATION_DIR="/home/$USER/mifos/html/"
echo "${{ secrets.FITER_DEMO_SERVER_SSH_KEY }}" > key.pem
chmod 400 key.pem
ssh -i key.pem -o StrictHostKeyChecking=no -l ${{ secrets.FITER_DEMO_SERVER_USERNAME }} ${{ secrets.FITER_DEMO_SERVER_URL }} 'rm -rf /home/$USER/mifos/html/*'
scp -r -i key.pem -o StrictHostKeyChecking=no $SOURCE_FILE $USER@$HOST:$DESTINATION_DIR