John 41b19efd30
All checks were successful
Build Hugo Site / build (push) Successful in 12s
try different workflow setup
2025-03-08 22:19:26 -06:00

43 lines
945 B
YAML

name: Build Hugo Site
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Install Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: 'latest'
- name: Ensure Output Directory Exists
run: |
mkdir -p /data/hugo/public
chmod -R 777 /data/hugo/public
- name: Debug Working Directory
run: |
pwd
ls -la
find . -name "hugo.toml"
hugo config
- 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