Thanks to visit codestin.com
Credit goes to github.com

Skip to content

feat: enhance JSON response handling across Reviewer3 API interactions #6

feat: enhance JSON response handling across Reviewer3 API interactions

feat: enhance JSON response handling across Reviewer3 API interactions #6

Workflow file for this run

name: Deploy Metascience
on:
push:
branches:
- main
workflow_dispatch:
jobs:
build_and_deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Clean server via SSH
uses: appleboy/[email protected]
with:
host: ${{ secrets.SSH_HOST }}
port: ${{ secrets.SSH_PORT }}
username: ${{ secrets.SSH_USERNAME }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
script: |
rm -rf /usr/local/apps/metascience_platform/*
rm -rf /usr/local/apps/metascience_platform/.??*
- name: Copy new files to server
uses: appleboy/scp-action@v1
with:
host: ${{ secrets.SSH_HOST }}
port: ${{ secrets.SSH_PORT }}
username: ${{ secrets.SSH_USERNAME }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
source: "./*"
target: /usr/local/apps/metascience_platform/
- name: Build project and restart both back and front end using pm2
uses: appleboy/[email protected]
with:
host: ${{ secrets.SSH_HOST }}
port: ${{ secrets.SSH_PORT }}
username: ${{ secrets.SSH_USERNAME }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
script: |
/bin/bash /home/githubdeployer/scripts/deploy_backend.sh
/bin/bash /home/githubdeployer/scripts/deploy_frontend.sh