38 lines
807 B
YAML
38 lines
807 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: Debug Working Directory
|
|
run: |
|
|
pwd
|
|
ls -la
|
|
echo "Current directory structure:"
|
|
find . -type f
|
|
|
|
- name: Build Hugo Site
|
|
run: |
|
|
# Build directly in the workspace, then copy to the mounted volume
|
|
hugo --minify
|
|
|
|
# Copy the generated files to the mounted volume
|
|
cp -r public/* /data/hugo/public/
|
|
|
|
# Verify the copy was successful
|
|
ls -la /data/hugo/public/
|