Comment build config

This commit is contained in:
David Eisinger
2024-12-09 05:57:05 -05:00
parent a94d810807
commit 1e5caad294

View File

@@ -17,29 +17,40 @@ triggers:
environment: environment:
HUGO_VERSION: 0.139.3 HUGO_VERSION: 0.139.3
tasks: tasks:
# Install Hugo + Bundler, and make all subsequent steps cd into site root
- setup: | - setup: |
wget --quiet https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb wget --quiet https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb
sudo apt install -y ./hugo_extended_${HUGO_VERSION}_linux-amd64.deb sudo apt install -y ./hugo_extended_${HUGO_VERSION}_linux-amd64.deb
sudo gem install bundler sudo gem install bundler
echo 'cd davideisinger.com' >> ~/.buildenv echo 'cd davideisinger.com' >> ~/.buildenv
# Spellcheck Markdown files
- spelling: | - spelling: |
npx cspell "content/**/*.md" npx cspell "content/**/*.md"
# Diff RSS template against Hugo default, make sure only differences are intentional
- rss: | - rss: |
curl -s https://raw.githubusercontent.com/gohugoio/hugo/refs/tags/v$HUGO_VERSION/tpl/tplimpl/embedded/templates/_default/rss.xml \ curl -s https://raw.githubusercontent.com/gohugoio/hugo/refs/tags/v$HUGO_VERSION/tpl/tplimpl/embedded/templates/_default/rss.xml \
| diff - ./themes/v2/layouts/_default/rss.xml \ | diff - ./themes/v2/layouts/_default/rss.xml \
| wc -l \ | wc -l \
| grep 7 | grep 7
# Start Ruby server for dithering images
- dither: | - dither: |
cd bin/dither cd bin/dither
sudo bundle install sudo bundle install
ROOT=~/davideisinger.com/content \ ROOT=~/davideisinger.com/content \
KEY=~/secret.key \ KEY=~/secret.key \
bundle exec rackup -p 4567 -D bundle exec rackup -p 4567 -D
# Build site
- hugo: | - hugo: |
HUGO_PARAMS_GIT_COMMIT=$(git rev-parse HEAD) \ HUGO_PARAMS_GIT_COMMIT=$(git rev-parse HEAD) \
DITHER_SERVER=http://localhost:4567 \ DITHER_SERVER=http://localhost:4567 \
hugo --minify hugo --minify
find public -name "*.enc" -type f -delete find public -name "*.enc" -type f -delete
# Sync files to production server
- deploy: | - deploy: |
if [ "$(git rev-parse main)" != "$(git rev-parse HEAD)" ]; then \ if [ "$(git rev-parse main)" != "$(git rev-parse HEAD)" ]; then \
complete-build; \ complete-build; \