File tree Expand file tree Collapse file tree 1 file changed +19
-2
lines changed Expand file tree Collapse file tree 1 file changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -37,12 +37,21 @@ jobs:
3737 - name : Install broken-link-checker
3838 run : npm install broken-link-checker
3939
40+ # - name: Start Hugo server
41+ # run: |
42+ # hugo server --quiet --port 1313 >/dev/null 2>&1 &
43+ # until curl -fs http://localhost:1313/ >/dev/null 2>&1; do
44+ # sleep 0.2
45+ # done
46+ # echo "✅ Hugo preview server is ready at http://localhost:1313"
47+
4048 - name : Build Hugo site
4149 run : hugo
4250
4351 - name : Start local server
4452 run : |
4553 python3 -m http.server 1313 --directory public >/dev/null 2>&1 &
54+ echo $! > server.pid
4655 until curl -fs http://localhost:1313 >/dev/null 2>&1; do sleep 0.2; done
4756 echo "✅ Python preview server is ready at http://localhost:1313"
4857
6473 exit 1
6574 fi
6675
67- - name : Stop Hugo server
76+ # - name: Stop Hugo server
77+ # if: always()
78+ # run: |
79+ # pkill -f "hugo server"
80+
81+ - name : Stop local server
6882 if : always()
6983 run : |
70- pkill -f "hugo server"
84+ if [ -f server.pid ]; then
85+ kill $(cat server.pid) || true
86+ echo "🛑 Local server stopped"
87+ fi
You can’t perform that action at this time.
0 commit comments