24 lines
401 B
YAML
24 lines
401 B
YAML
name: Deploy to Pi
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- actions
|
|
|
|
jobs:
|
|
deploy:
|
|
runs-on: self-hosted
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Stop existing server
|
|
run: |
|
|
pkill -f 'python3 -m http.server' || true
|
|
|
|
- name: Start server
|
|
run: |
|
|
chmod +x ./start.sh
|
|
nohup ./start.sh > server.log 2>&1 &
|