Updating pipeline to generate logs

This commit is contained in:
shockrah 2023-01-16 15:42:42 -08:00
parent 4e8d321bfa
commit 13b5578574
4 changed files with 22 additions and 5 deletions

View File

@ -33,7 +33,9 @@ build-shockrah.xyz:
script: script:
# Main config is found in the root of this project dir # Main config is found in the root of this project dir
- hugo - hugo
# Make sure to expire these artifacts as they are only needed per deployment
artifacts: artifacts:
expire_in: 1 week
paths: paths:
- public/ - public/

View File

@ -4,5 +4,5 @@
tasks: tasks:
- name: Copy Blog Content - name: Copy Blog Content
copy: copy:
src: "./public/" src: "public/"
dest: /var/www/shockrah.xyz dest: /var/www/shockrah.xyz

View File

@ -1,10 +1,10 @@
#!/bin/bash #!/bin/bash -e
[[ "$1" = "" ]] && echo No filename given for new post\! && exit 1 [[ "$1" = "" ]] && echo No filename given for new post\! && exit 1
file="$1" file="$(basename $1)"
cat << EOF | tee content/posts/"$file" cat << EOF | tee content/posts/"$file.md"
--- ---
title: $(basename -s .md "$file") title: $(basename -s .md "$file")
date: $(date '+%F') date: $(date '+%F')

View File

@ -1,7 +1,22 @@
#!/bin/sh #!/bin/sh
set -x set -e
# Build to optimize images and not much else if im being honest # Build to optimize images and not much else if im being honest
usage() {
cat <<EOF
Summary:
Will compress and resize images so that they don't take up too much space
and are easier on traffic usage
Usage:
optimize.sh [files to optimize...]
EOF
}
if [ -z "$1" ]; then
usage
exit 1
fi
mkdir -p output/ mkdir -p output/
for f in "$@"; do for f in "$@"; do
convert -resize 900x $f output/`basename $f` convert -resize 900x $f output/`basename $f`