Skip to content

Commit

Permalink
Update deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
shapeshed committed May 4, 2023
1 parent 7bda545 commit a454885
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 11 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@ jobs:
role-to-assume: ${{ secrets.AWS_ROLE }}
aws-region: ${{ secrets.AWS_DEFAULT_REGION }}
- name: Sync with S3 and invalidate cache
run: |
FILES=`aws s3 sync --size-only --dryrun public/ s3://${{ secrets.S3_BUCKET }} | awk '{print $3;}' | cut -c 7- | tr '\n' ' '`
echo $FILES
aws s3 sync --size-only --delete public/ s3://${{ secrets.S3_BUCKET }}
run: make deploy
#run: |
# FILES=`aws s3 sync --size-only --dryrun public/ s3://${{ secrets.S3_BUCKET }} | awk '{print $3;}' | cut -c 7- | tr '\n' ' '`
# echo $FILES
# aws s3 sync --size-only --delete public/ s3://${{ secrets.S3_BUCKET }}
# if [ -n "${FILES}" ]; then aws cloudfront create-invalidation --distribution-id ${{ secrets.CLOUDFRONT_DIST_ID }} --paths $FILES; fi
11 changes: 9 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,16 @@ hugo:
gzip-static:
@find ./public -type f \( -name "*.html" -o -name "*.css" -o -name "*.xml" \) -exec gzip -n -k -f -9 {} \;

optimize-images:
images:
find ./ -type f -name '*.png' -exec sh -c 'avifenc --min 10 --max 30 $1 "${1%.png}.avif"' _ {} \;
find ./ -type f -name '*.jpg' -exec sh -c 'avifenc --min 10 --max 30 $1 "${1%.png}.avif"' _ {} \;
find ./ -type f -name '*.jpeg' -exec sh -c 'avifenc --min 10 --max 30 $1 "${1%.png}.avif"' _ {} \;
find ./ -type f -name '*.png' -exec sh -c 'cwebp $1 -o "${1%.jpg}.webp"' _ {} \;
find ./ -type f -name '*.jpg' -exec sh -c 'cwebp $1 -o "${1%.jpg}.webp"' _ {} \;
find ./ -type f -name '*.jpeg' -exec sh -c 'cwebp $1 -o "${1%.jpg}.webp"' _ {} \;
find ./static/images/articles -mtime -1 -name '*.png' | xargs optipng -o7 -strip all


minify-html:
@minify -r --match=\.html public -o .

Expand All @@ -33,7 +40,7 @@ css:
@find ./public -name index.html | xargs sed -i "s/styles\.css/$(CSSMD5)\.css/"

deploy:
@rsync -azz -e "ssh" --delete ./public/ finney.shapeshed.com:/srv/http/shapeshed.com
hugo deploy

validate:
@html5validator --ignore --ignore-re "loading|public/examples*|public/google*|public/y_key*|public/images/articles/index.html" --root public
13 changes: 8 additions & 5 deletions content/posts/vim-help-in-vertical-split.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
+++
date = "2023-05-02T01:00:00+00:00"
description = "A simple vim tip to open help files in a horizontal split window for easier reading"
tags = ["Vim","UNIX"]
draft = true
+++
date = "2023-05-02T01:00:00+00:00"
description = "A simple vim tip to open help files in a horizontal split window for easier reading"
tags = ["Vim","UNIX"]
draft = true
title = "Open vim help files in a vertical split"
+++

![Some title][17]

## Making :help more readable

The default behaviour in vim opens help files in a horizontal split window. If
Expand Down Expand Up @@ -72,3 +74,4 @@ vim.api.nvim_create_autocmd({ "BufWinEnter" }, {
[14]: https://github.com/nvim-lualine/lualine.nvim
[15]: https://github.com/nvimdev/galaxyline.nvim
[16]: https://github.com/famiu/feline.nvim
[17]: /images/articles/test-hero-4-3.png

0 comments on commit a454885

Please sign in to comment.