46 lines
1.1 KiB
YAML
46 lines
1.1 KiB
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: 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
|
|
mkdir -p /data/hugo/public
|
|
|
|
# Build directly in the workspace
|
|
hugo --minify
|
|
|
|
echo "Contents of generated public directory:"
|
|
ls -la public/
|
|
|
|
echo "Copying files to mounted volume..."
|
|
cp -rv public/* /data/hugo/public/
|
|
|
|
echo "Final contents of mounted volume:"
|
|
ls -la /data/hugo/public/
|