Skip to content

Merge pull request #35 from tunglambg131003:development #19

Merge pull request #35 from tunglambg131003:development

Merge pull request #35 from tunglambg131003:development #19

Workflow file for this run

name: Auto deployment to production server
on:
push:
branches:
- product
workflow_dispatch:
jobs:
deploy:
name: Deploy to Product server
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup SSH KEY
run: |
mkdir -p ~/.ssh
echo "${{ secrets.SSH_PRIVATE_DEPLOYMENT_KEY }}" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts
- name: Deploy to Product
run: |
ssh -i ~/.ssh/id_rsa -o StrictHostKeyChecking=no -p 22 root@${{ secrets.SERVER_IP }} "cd /root/MedDict/COMP2030_Meddict && git pull origin product && chmod +x ./deploy.sh && ./deploy.sh"
echo "Deployed Successfully"