deploy
All checks were successful
Personal Website - Run Python HTTP Server / deploy (push) Successful in 3s
All checks were successful
Personal Website - Run Python HTTP Server / deploy (push) Successful in 3s
This commit is contained in:
parent
b763bb8c96
commit
120cb38d23
34
.gitea/workflows/deploy.yml
Normal file
34
.gitea/workflows/deploy.yml
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
name: Personal Website - Run Python HTTP Server
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
deploy:
|
||||||
|
runs-on: pihq
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
run: |
|
||||||
|
cd ~/apps/space-calc
|
||||||
|
git fetch
|
||||||
|
git checkout main
|
||||||
|
git pull origin main
|
||||||
|
|
||||||
|
- name: Stop existing screen session, if running
|
||||||
|
run: |
|
||||||
|
if screen -list | grep -q "space_calc_server"; then
|
||||||
|
echo "Stopping existing screen session..."
|
||||||
|
screen -S space_calc_server -X quit
|
||||||
|
fi
|
||||||
|
- name: Install
|
||||||
|
run : |
|
||||||
|
cd ~/apps/space-calc
|
||||||
|
npm i
|
||||||
|
- name: Start server in screen session
|
||||||
|
run: |
|
||||||
|
cd ~/apps/space-calc
|
||||||
|
setsid screen -dmS space_calc_server bash -c 'npm run preview > server.log 2>&1'
|
||||||
|
echo "Server started in detached screen session"
|
||||||
Loading…
Reference in New Issue
Block a user