Update Readme.md #34
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |