John 6fb9b78484
Some checks failed
Build Hugo Site / build (push) Failing after 23s
update with better permissions
2025-03-09 08:24:35 -05:00

51 lines
1.4 KiB
YAML

name: Build Hugo Site
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
submodules: true # Fetch Hugo themes (true OR recursive)
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
- name: Install Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: 'latest'
extended: true # Install extended version
- name: Debug Working Directory
run: |
pwd
ls -la
echo "Current directory structure:"
find . -type f
echo "Mount point check:"
ls -la /data/hugo/public || echo "Mount point not accessible"
- name: Build Hugo Site
run: |
# Create the target directory if it doesn't exist
sudo mkdir -p /data/hugo/public
sudo chown -R root:root /data/hugo
# Build directly in the workspace
hugo --minify --debug
echo "Contents of generated public directory:"
ls -la public/
echo "Copying files to mounted volume..."
sudo rm -rf /data/hugo/public/* # Clean target directory first
sudo cp -rv public/* /data/hugo/public/
echo "Final contents of mounted volume:"
ls -la /data/hugo/public/