diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6b01b9e..e2afcf5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -33,7 +33,9 @@ build-shockrah.xyz: script: # Main config is found in the root of this project dir - hugo + # Make sure to expire these artifacts as they are only needed per deployment artifacts: + expire_in: 1 week paths: - public/ diff --git a/scripts/deploy-blog.yml b/scripts/deploy-blog.yml index 43e92e8..0efcfa8 100644 --- a/scripts/deploy-blog.yml +++ b/scripts/deploy-blog.yml @@ -4,5 +4,5 @@ tasks: - name: Copy Blog Content copy: - src: "./public/" + src: "public/" dest: /var/www/shockrah.xyz diff --git a/scripts/new-post.sh b/scripts/new-post.sh index be53d01..022785b 100644 --- a/scripts/new-post.sh +++ b/scripts/new-post.sh @@ -1,10 +1,10 @@ -#!/bin/bash +#!/bin/bash -e [[ "$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") date: $(date '+%F') diff --git a/scripts/optimize.sh b/scripts/optimize.sh index 1c07149..f448164 100644 --- a/scripts/optimize.sh +++ b/scripts/optimize.sh @@ -1,7 +1,22 @@ #!/bin/sh -set -x +set -e # Build to optimize images and not much else if im being honest +usage() { +cat <