fix: Use home directory instead of /opt for CT109 deployment (permission issue)
This commit is contained in:
parent
d4c2bedf9b
commit
541b531290
@ -191,16 +191,25 @@ jobs:
|
||||
set -e
|
||||
export VERSION="${{ github.sha }}"
|
||||
|
||||
# Navigate to deployment directory
|
||||
cd /opt/littleshop || mkdir -p /opt/littleshop && cd /opt/littleshop
|
||||
# Use home directory for deployment
|
||||
DEPLOY_DIR="$HOME/littleshop"
|
||||
echo "Using deployment directory: $DEPLOY_DIR"
|
||||
|
||||
# Create deployment directory if it doesn't exist
|
||||
mkdir -p "$DEPLOY_DIR"
|
||||
cd "$DEPLOY_DIR"
|
||||
|
||||
# Clone or pull latest code
|
||||
if [ ! -d .git ]; then
|
||||
echo "Cloning repository..."
|
||||
rm -rf * # Clean any existing files
|
||||
git clone https://git.silverlabs.uk/Jamie/littleshop.git .
|
||||
else
|
||||
echo "Repository already cloned, pulling latest..."
|
||||
git fetch origin
|
||||
fi
|
||||
echo "Pulling latest code from git..."
|
||||
git fetch origin
|
||||
|
||||
echo "Checking out version: $VERSION"
|
||||
git checkout $VERSION || git checkout main
|
||||
|
||||
# Build images on CT109
|
||||
|
||||
Loading…
Reference in New Issue
Block a user