pdx-peculiarties/.gitea/workflows/deploy.yml
david 7dbae7c4c8
Some checks failed
PDX Pecularities Server / deploy (push) Failing after 0s
change port
2025-04-07 18:24:22 -07:00

33 lines
809 B
YAML

name: PDX Pecularities Server
on:
push:
branches:
- main
jobs:
deploy:
runs-on: self-hosted
steps:
- name: Checkout code
run: |
cd ~/pdx-pecularities
git fetch
git checkout main
git pull origin main
- name: Stop existing screen session, if running
run: |
if screen -list | grep -q "pdx_pecularities"; then
echo "Stopping existing screen session..."
screen -S pdx_pecularities -X quit
fi
- name: Start server in screen session
run: |
cd ~/pdx-pecularities
chmod +x ./start.sh
setsid screen -dmS pdx_pecularities bash -c 'python3 -m http.server 8083 > server.log 2>&1'
echo "Server started in detached screen session"