Initial app + gitea action #1
33
.gitea/workflows/deploy.yml
Normal file
33
.gitea/workflows/deploy.yml
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
name: Personal Website - Run Python HTTP Server
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
deploy:
|
||||||
|
runs-on: self-hosted
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
run: |
|
||||||
|
cd ~/ota-tv-web
|
||||||
|
git fetch
|
||||||
|
git checkout main
|
||||||
|
git pull origin main
|
||||||
|
|
||||||
|
- name: Stop existing screen session, if running
|
||||||
|
run: |
|
||||||
|
if screen -list | grep -q "ota_tv_web_server"; then
|
||||||
|
echo "Stopping existing screen session..."
|
||||||
|
screen -S ota_tv_web -X quit
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: Start server in screen session
|
||||||
|
run: |
|
||||||
|
cd ~/ota-tv-web
|
||||||
|
chmod +x ./start.sh
|
||||||
|
sassc css/style.scss css/style.css
|
||||||
|
setsid screen -dmS ota_tv_web bash -c 'HTTP_PORT=8081 WS_PORT=3001 npm start > server.log 2>&1'
|
||||||
|
echo "Server started in detached screen session"
|
3
.vscode/settings.json
vendored
Normal file
3
.vscode/settings.json
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"typescript.tsdk": "node_modules/typescript/lib"
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user