Skip to content

Merge branch 'main' of https://github.com/SRM47/csci181s-course-proje… #32

Merge branch 'main' of https://github.com/SRM47/csci181s-course-proje…

Merge branch 'main' of https://github.com/SRM47/csci181s-course-proje… #32

Workflow file for this run

name: Deploy to Production Server
on:
push:
branches:
- main # Set this to whichever branches you want to trigger the deployment.
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up SSH key
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Execute SSH commands
run: |
ssh -o "StrictHostKeyChecking=no" [email protected] "
echo 'Connected successfully';
cd csci181s-course-project/;
git stash;
git pull;
sudo systemctl stop server.service;
sudo systemctl enable server.service;
sudo systemctl start server.service;
sudo systemctl status server.service;
"