fix(ci): password SSH + hugo server restart workflow

This commit is contained in:
2026-02-14 00:57:26 -05:00
parent 04b24225d4
commit 927f238358

View File

@@ -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
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"