personal-site/.gitea/workflows/deploy.yml
david 32e926d15c
All checks were successful
Personal Website - Run Python HTTP Server / deploy (push) Successful in 1s
update action run script
2025-04-03 19:50:42 -07:00

33 lines
689 B
YAML

name: Personal Website - Run Python HTTP Server
on:
push:
branches:
- main
jobs:
deploy:
runs-on: self-hosted
env:
PORT: 8080
steps:
- name: Checkout code
run: |
cd ~/personal-site
git checkout $GITEA_REF_NAME
git pull origin $GITEA_REF_NAME
- name: Stop existing server, if running
run: |
pkill -f 'python3 -m http.server' || true
- name: Start server
run: |
cd ~/personal-site
chmod +x ./start.sh
sassc css/style.scss css/style.css
python3 -m http.server $PORT > server.log 2>&1 &
echo "Server started in background"