Merge pull request 'Github action support' (#2) from actions into main

Reviewed-on: https://git.dwestgate.us/david/personal-site/pulls/2
This commit is contained in:
david 2025-04-03 19:44:25 -07:00
commit e214a2aa31

View File

@ -0,0 +1,31 @@
name: Personal Website - Run Python HTTP Server
on:
push:
branches:
- actions
jobs:
deploy:
runs-on: self-hosted
env:
PORT: 8080
steps:
- name: Checkout code
run: |
cd ~/personal-site
git checkout $GITEA_REF_NAME
git pull origin $GITEA_REF_NAME
- name: Stop existing server, if running
run: |
pkill -f 'python3 -m http.server' || true
- name: Start server
run: |
cd ~/personal-site
chmod +x ./start.sh
sassc css/style.scss css/style.css
exec python3 -m http.server $PORT > server.log 2>&1