build: clean up artifact prior to build

somehow cache in netlify
This commit is contained in:
Ming Di Leom 2025-04-07 08:30:25 +00:00
parent 0866cd3890
commit b330435a1f
No known key found for this signature in database
GPG Key ID: 32D3E28E96A695E8
1 changed files with 2 additions and 0 deletions

View File

@ -13,11 +13,13 @@ hexo generate
if [ "$NODE_ENV" = "production" ] && [ -d "public/" ]; then if [ "$NODE_ENV" = "production" ] && [ -d "public/" ]; then
# deploy site assets # deploy site assets
rm -rf "site/"
git clone --depth 1 --branch site https://gitlab.com/curben/blog.git site git clone --depth 1 --branch site https://gitlab.com/curben/blog.git site
cp -r site/* "public/" cp -r site/* "public/"
rm -f "public/README.md" rm -f "public/README.md"
# deploy microblog # deploy microblog
rm -rf "microblog/"
git clone --depth 1 --branch microblog https://gitlab.com/curben/blog.git microblog git clone --depth 1 --branch microblog https://gitlab.com/curben/blog.git microblog
cd "microblog/" cd "microblog/"
export PATH="$PATH:../node_modules/.bin" export PATH="$PATH:../node_modules/.bin"