1
0
mirror of https://github.com/tommytran732/tommytran.io synced 2024-11-09 19:51:34 -05:00
tommytran.io/cloudflare-build.sh
Thien Tran af149dbefc
Disable goproxy
Signed-off-by: Thien Tran <contact@tommytran.io>
2023-06-16 05:15:09 -07:00

14 lines
233 B
Bash

#!/bin/bash
export GOPROXY=direct
export GOSUMD=off
export CGO_ENABLED=1
go install -tags extended github.com/gohugoio/hugo@latest
if [ "$CF_PAGES_BRANCH" == "main" ]; then
hugo --minify
else
hugo -b $CF_PAGES_URL --minify
fi