This commit is contained in:
parent
3803e65456
commit
6fb9b78484
@ -12,11 +12,15 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Checkout Repository
|
- name: Checkout Repository
|
||||||
uses: actions/checkout@v4
|
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
|
- name: Install Hugo
|
||||||
uses: peaceiris/actions-hugo@v2
|
uses: peaceiris/actions-hugo@v2
|
||||||
with:
|
with:
|
||||||
hugo-version: 'latest'
|
hugo-version: 'latest'
|
||||||
|
extended: true # Install extended version
|
||||||
|
|
||||||
- name: Debug Working Directory
|
- name: Debug Working Directory
|
||||||
run: |
|
run: |
|
||||||
@ -30,16 +34,18 @@ jobs:
|
|||||||
- name: Build Hugo Site
|
- name: Build Hugo Site
|
||||||
run: |
|
run: |
|
||||||
# Create the target directory if it doesn't exist
|
# Create the target directory if it doesn't exist
|
||||||
mkdir -p /data/hugo/public
|
sudo mkdir -p /data/hugo/public
|
||||||
|
sudo chown -R root:root /data/hugo
|
||||||
|
|
||||||
# Build directly in the workspace
|
# Build directly in the workspace
|
||||||
hugo --minify
|
hugo --minify --debug
|
||||||
|
|
||||||
echo "Contents of generated public directory:"
|
echo "Contents of generated public directory:"
|
||||||
ls -la public/
|
ls -la public/
|
||||||
|
|
||||||
echo "Copying files to mounted volume..."
|
echo "Copying files to mounted volume..."
|
||||||
cp -rv public/* /data/hugo/public/
|
sudo rm -rf /data/hugo/public/* # Clean target directory first
|
||||||
|
sudo cp -rv public/* /data/hugo/public/
|
||||||
|
|
||||||
echo "Final contents of mounted volume:"
|
echo "Final contents of mounted volume:"
|
||||||
ls -la /data/hugo/public/
|
ls -la /data/hugo/public/
|
||||||
@ -4,4 +4,4 @@ description: "This is a website"
|
|||||||
date: 2025-03-08
|
date: 2025-03-08
|
||||||
---
|
---
|
||||||
|
|
||||||
Hello World!?
|
Hello World!?!?!?
|
||||||
Loading…
x
Reference in New Issue
Block a user