dms #1
@@ -24,19 +24,18 @@ jobs:
|
|||||||
# Ensure we are in the directory containing mkdocs.yml
|
# Ensure we are in the directory containing mkdocs.yml
|
||||||
mkdocs build --clean --site-dir ./dist
|
mkdocs build --clean --site-dir ./dist
|
||||||
|
|
||||||
- name: Deploy to host-mounted folder
|
- name: Deploy to host
|
||||||
run: |
|
run: |
|
||||||
# 1. Verify the build output exists
|
# Ensure the mounted directory exists in the job container
|
||||||
if [ ! -d "./dist" ]; then
|
mkdir -p /host_notes
|
||||||
echo "Error: Build directory ./dist does not exist!"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# 2. Ensure destination exists (this is the host-mounted volume)
|
# Use -L to ensure we copy actual data, not symlinks
|
||||||
mkdir -p /notes
|
# Use -p to preserve permissions
|
||||||
|
cp -RLp ./dist/* /host_notes/
|
||||||
|
|
||||||
# 3. Copy contents from ./dist to /notes
|
# Force the host's UID/GID so 'jay' can read/write them
|
||||||
cp -v -R ./dist/* /notes/
|
# Replace 1000 with your actual UID if 'jay' is different
|
||||||
|
chown -R 1000:1000 /host_notes/*
|
||||||
|
|
||||||
# 4. Sync to ensure data is written to disk
|
echo "Deployment complete. Checking /host_notes:"
|
||||||
sync
|
ls -F /host_notes
|
||||||
|
|||||||
Reference in New Issue
Block a user