summaryrefslogtreecommitdiffstats
path: root/publish.sh
blob: 3c12d5fc5407fb26e3bf036dab92aa13136c5bc3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/sh

rm .hugo_build.lock

# 执行 Hugo 构建和部署
commit_date=$(date +"%Y-%m-%d %H:%M:%S")
cd ~/glowisle/
hugo --cleanDestinationDir --gc --minify
cd ~/glowisle/public || exit 1
git add .
git commit -m "auto update: $commit_date"
git push origin main

echo "部署完成!"