feat: enhance deployment script to clone repository if not present
This commit is contained in:
Submodule .claude/worktrees/agent-a4aa04a9c476f1c6d deleted from 64d63587c7
+1
Submodule .claude/worktrees/agent-a535691b7def5bafe added at 80df164a2b
@@ -89,8 +89,16 @@ jobs:
|
|||||||
port: ${{ secrets.VPS_PORT || 22 }}
|
port: ${{ secrets.VPS_PORT || 22 }}
|
||||||
script: |
|
script: |
|
||||||
set -e
|
set -e
|
||||||
cd /opt/ZeaVis-Edu
|
DEPLOY_PATH="${DEPLOY_PATH:-/opt/ZeaVis-Edu}"
|
||||||
git pull origin main
|
|
||||||
|
if [ ! -d "$DEPLOY_PATH/.git" ]; then
|
||||||
|
mkdir -p "$DEPLOY_PATH"
|
||||||
|
git clone https://github.com/${{ github.repository }}.git "$DEPLOY_PATH"
|
||||||
|
fi
|
||||||
|
|
||||||
|
cd "$DEPLOY_PATH"
|
||||||
|
git checkout main
|
||||||
|
git pull --ff-only origin main
|
||||||
|
|
||||||
cat > .env << 'ENVEOF'
|
cat > .env << 'ENVEOF'
|
||||||
GITHUB_REPOSITORY=${{ github.repository }}
|
GITHUB_REPOSITORY=${{ github.repository }}
|
||||||
|
|||||||
Reference in New Issue
Block a user