Added build with webp files
This commit is contained in:
parent
38473772d8
commit
7cb88455cf
@ -11,6 +11,6 @@ deploy:
|
||||
- ssh-keyscan $SSH_HOST >> ~/.ssh/known_hosts
|
||||
- chmod 644 ~/.ssh/known_hosts
|
||||
script:
|
||||
- ssh -p $SSH_PORT $SSH_USER@$SSH_HOST "cd repo && git stash && git pull --force origin master && rm -rf /var/www/rogs.me/* && hugo -s . -d /var/www/rogs.me/"
|
||||
- ssh -p $SSH_PORT $SSH_USER@$SSH_HOST "cd repo && git stash && git pull --force origin master && ./build.sh"
|
||||
only:
|
||||
- master
|
||||
|
6
build.sh
Executable file
6
build.sh
Executable file
@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
find ./ -type f -name '*.png' -not -path '*/.git/*' -exec sh -c 'cwebp -lossless $1 -o "${1%.png}.webp"' _ {} \;
|
||||
find . -type f -not -path '*/.git/*' -exec sed -i -e 's/\.png/\.webp/g' {} \;
|
||||
rm -rf /var/www/rogs.me/*
|
||||
hugo -s . -d /var/www/rogs.me/
|
Loading…
x
Reference in New Issue
Block a user