Merge pull request #126 from FITER1/TSS-145 #36
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |