From 927f23835870b710d3091f7fd5491de44e0738f6 Mon Sep 17 00:00:00 2001 From: hobokenchicken Date: Sat, 14 Feb 2026 00:57:26 -0500 Subject: [PATCH] fix(ci): password SSH + hugo server restart workflow --- .gitea/workflows/hugo.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.gitea/workflows/hugo.yml b/.gitea/workflows/hugo.yml index 7eec2e2..2094967 100644 --- a/.gitea/workflows/hugo.yml +++ b/.gitea/workflows/hugo.yml @@ -36,16 +36,17 @@ jobs: HUGO_ENV: production run: hugo --minify -- name: Deploy to production server +- name: Deploy to live Hugo server if: github.ref == 'refs/heads/main' uses: appleboy/ssh-action@v1.0.0 with: host: 172.20.1.231 username: root - key: ${{ secrets.SERVER_SSH_KEY }} + password: ${{ secrets.SERVER_PASSWORD }} script: | cd /var/www/blog git pull origin main - hugo --minify - chown -R www-data:www-data /var/www/blog/public - systemctl reload nginx || systemctl reload apache2 || true \ No newline at end of file + pkill -f "hugo server" || true + nohup hugo server --bind 0.0.0.0 --port 1313 --baseURL=https://dustin.coffee --appendPort=false --disableLiveReload > /var/log/hugo.log 2>&1 & + sleep 2 + curl -f https://dustin.coffee || echo "Health check failed" \ No newline at end of file