pdx-peculiarties/.gitea/workflows/deploy.yml
david 00b069eeb0
Some checks are pending
PDX Pecularities Server / deploy (push) Waiting to run
html outline
2025-04-07 18:19:38 -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 8080 > server.log 2>&1'
echo "Server started in detached screen session"