Skip to content

dashboard fixes

dashboard fixes #9

Workflow file for this run

# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# FInally, it will publish build folder in the remote Azure VM
name: Test build and deploy
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.10.0]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
- uses: actions/checkout@v3
- uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.ADSADMIN_SSH_PRIVATE_KEY }}
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm ci
- run: npm run build-safers-test-linux
- name: Copy to remote VM
uses: nogsantos/scp-deploy@master
with:
src: ./build/build.tar
host: ${{ secrets.SAFERS_VM_IP_ADDRESS }}
remote: /var/www/html/safers-frontend/test/build.tar
port: ${{ secrets.SAFERS_VM_PORT }}
user: ${{ secrets.SAFERS_VM_USERNAME }}
key: ${{ secrets.ADSADMIN_SSH_PRIVATE_KEY }}
- name: Publish
uses: appleboy/[email protected]
with:
host: ${{ secrets.SAFERS_VM_IP_ADDRESS }}
username: ${{ secrets.SAFERS_VM_USERNAME }}
key: ${{ secrets.ADSADMIN_SSH_PRIVATE_KEY }}
port: ${{ secrets.SAFERS_VM_PORT }}
command_timeout: 30m
script: |
tar -xof ../../var/www/html/safers-frontend/test/build.tar -C ../../var/www/html/safers-frontend/test/ && rm -rf ../../var/www/html/safers-frontend/test/build.tar && sudo systemctl restart nginx