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