Compare commits
2 Commits
b7c5b1e8b7
...
6001f860fb
Author | SHA1 | Date | |
---|---|---|---|
![]() |
6001f860fb | ||
![]() |
fd6ece4f74 |
@ -1,4 +1,4 @@
|
|||||||
name: Deploy to Pi
|
name: Personal Website - Run Python HTTP Server
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
@ -9,12 +9,15 @@ jobs:
|
|||||||
deploy:
|
deploy:
|
||||||
runs-on: self-hosted
|
runs-on: self-hosted
|
||||||
|
|
||||||
|
env:
|
||||||
|
PORT: 8080
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
run: |
|
run: |
|
||||||
cd ~/personal-site
|
cd ~/personal-site
|
||||||
git checkout actions
|
git checkout $GITEA_REF_NAME
|
||||||
git pull origin actions
|
git pull origin $GITEA_REF_NAME
|
||||||
|
|
||||||
- name: Stop existing server, if running
|
- name: Stop existing server, if running
|
||||||
run: |
|
run: |
|
||||||
@ -25,4 +28,4 @@ jobs:
|
|||||||
cd ~/personal-site
|
cd ~/personal-site
|
||||||
chmod +x ./start.sh
|
chmod +x ./start.sh
|
||||||
sassc css/style.scss css/style.css
|
sassc css/style.scss css/style.css
|
||||||
exec python3 -m http.server 8080 > server.log 2>&1
|
exec python3 -m http.server $PORT > server.log 2>&1
|
||||||
|
13
dev.sh
13
dev.sh
@ -1,13 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
sassc css/style.scss css/style.css
|
|
||||||
python3 -m http.server 8080 &
|
|
||||||
|
|
||||||
# Keypress loop
|
|
||||||
while true; do
|
|
||||||
read -n 1 -s key
|
|
||||||
if [[ $key == "r" ]]; then
|
|
||||||
echo -e "\nRecompiling SCSS..."
|
|
||||||
sassc css/style.scss css/style.css && echo "Done."
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
10
start.sh
10
start.sh
@ -1,3 +1,13 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
sassc css/style.scss css/style.css
|
sassc css/style.scss css/style.css
|
||||||
python3 -m http.server 8080 &
|
python3 -m http.server 8080 &
|
||||||
|
|
||||||
|
# Keypress loop
|
||||||
|
while true; do
|
||||||
|
read -n 1 -s key
|
||||||
|
if [[ $key == "r" ]]; then
|
||||||
|
echo -e "\nRecompiling SCSS..."
|
||||||
|
sassc css/style.scss css/style.css && echo "Done."
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user