try different workflow setup
All checks were successful
Build Hugo Site / build (push) Successful in 12s

This commit is contained in:
John 2025-03-08 22:19:26 -06:00
parent c53a9efc04
commit 41b19efd30

View File

@ -14,24 +14,29 @@ jobs:
uses: actions/checkout@v4
- name: Install Hugo
run: |
apt update
apt install -y hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: 'latest'
- name: Build Hugo Site
- name: Ensure Output Directory Exists
run: |
mkdir -p /data/hugo/public
chmod -R 777 /data/hugo/public
- name: Debug Working Directory
run: |
# Print working directory for debugging
pwd
ls -la
# Navigate to Hugo site directory if it's in a subdirectory
cd /data/git/repositories/john/hugo
find . -name "hugo.toml"
hugo config
# Build directly to the mounted public directory
hugo --minify -d /data/hugo/public
- name: Build Hugo Site
working-directory: /workspace/john/hugo-blog
run: |
hugo --minify -d /data/hugo/public --config hugo.toml
# Verify the build was successful
if [ ! -d /data/hugo/public ]; then
echo "Hugo build failed - public directory not created"
exit 1
fi
fi