SkillPilot Deployment Process
This document describes the automated deployment workflow for the SkillPilot application on Linux servers.
Overview
The deployment process ensures that: 1. The latest code is pulled from Git. 2. Vocabulary Decks are correctly deployed from the curriculum source-of-truth to the application's data folder. 3. Whitepaper assets (Markdown + images) are deployed into the app's public folder. 4. The React frontend is rebuilt with the new data. 5. The system service is restarted.
The Deployment Script (scripts/deploy.sh)
We use a bash script to automate these steps.
#!/bin/bash
set -e
# 1. Navigate to Project Root
cd /home/enpasos/skillpilot
# 2. Get Latest Code
echo "Hole Updates..."
git pull
# 3. Deploy Vocabulary Decks (NEW)
# This copies json files from curricula/.../json/ to app/public/data/
echo "Deploying Vocabulary Decks..."
python3 scripts/deploy_decks.py
# 4. Deploy Whitepaper Assets (NEW)
# This copies docs/whitepaper and referenced images into app/public
echo "Deploying Whitepaper assets..."
python3 scripts/deploy_whitepaper.py
# 5. Build Frontend
cd app
echo "Baue Anwendung..."
npm run build
# 6. Restart Service
echo "Starte Service neu..."
sudo systemctl restart skillpilot
echo "Fertig!"
Why this order?
git pull: Ensures we have the latestjsoncurriculum files and thedeploy_decks.pyscript.deploy_decks.py: Must run beforenpm run build. This script places all deck files matching_deck*.json(including locale suffixes like_deck.de.jsonor_deck_en.json) intoapp/public/data/.deploy_whitepaper.py: Must run beforenpm run build. This script places the Whitepaper Markdown and images intoapp/public/.npm run build: The build process parses thepublic/directory and bundles assets. By having the decks and whitepaper assets in place first, we ensure they are available in the final production build.systemctl restart: Reloads the backend (Spring Boot) or web server to serve the new application.
Prerequisites on Server
- Python 3: Required to run
scripts/deploy_decks.pyandscripts/deploy_whitepaper.py. - Node.js & npm: Required for building the frontend.
- Git: Required for pulling updates.
- Sudo Access: Required for restarting the system service.