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:
commit
e214a2aa31
31
.gitea/workflows/deploy.yml
Normal file
31
.gitea/workflows/deploy.yml
Normal 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
|
Loading…
Reference in New Issue
Block a user