fix: Add git checkout main to deployment scripts
Some checks failed
ParentFlow CI/CD Pipeline / Backend Tests (push) Has been cancelled
ParentFlow CI/CD Pipeline / Frontend Tests (push) Has been cancelled
ParentFlow CI/CD Pipeline / Security Scanning (push) Has been cancelled
ParentFlow CI/CD Pipeline / Build Docker Images (map[context:maternal-app/maternal-app-backend dockerfile:Dockerfile.production name:backend]) (push) Has been cancelled
ParentFlow CI/CD Pipeline / Build Docker Images (map[context:maternal-web dockerfile:Dockerfile.production name:frontend]) (push) Has been cancelled
ParentFlow CI/CD Pipeline / Deploy to Development (push) Has been cancelled
ParentFlow CI/CD Pipeline / Deploy to Production (push) Has been cancelled
CI/CD Pipeline / Lint and Test (push) Has been cancelled
CI/CD Pipeline / E2E Tests (push) Has been cancelled
CI/CD Pipeline / Build Application (push) Has been cancelled
Some checks failed
ParentFlow CI/CD Pipeline / Backend Tests (push) Has been cancelled
ParentFlow CI/CD Pipeline / Frontend Tests (push) Has been cancelled
ParentFlow CI/CD Pipeline / Security Scanning (push) Has been cancelled
ParentFlow CI/CD Pipeline / Build Docker Images (map[context:maternal-app/maternal-app-backend dockerfile:Dockerfile.production name:backend]) (push) Has been cancelled
ParentFlow CI/CD Pipeline / Build Docker Images (map[context:maternal-web dockerfile:Dockerfile.production name:frontend]) (push) Has been cancelled
ParentFlow CI/CD Pipeline / Deploy to Development (push) Has been cancelled
ParentFlow CI/CD Pipeline / Deploy to Production (push) Has been cancelled
CI/CD Pipeline / Lint and Test (push) Has been cancelled
CI/CD Pipeline / E2E Tests (push) Has been cancelled
CI/CD Pipeline / Build Application (push) Has been cancelled
- Update deploy-production.sh to properly checkout main branch - Fix PRODUCTION_INSTALLATION.md to include checkout main step - Ensure all deployment instructions switch to main branch correctly
This commit is contained in:
@@ -101,13 +101,15 @@ log "${CYAN}Step 5: Fetching latest code from main branch...${NC}"
|
||||
if [ -d "$DEPLOY_DIR" ]; then
|
||||
warning "Deployment directory exists, pulling latest changes..."
|
||||
cd "$DEPLOY_DIR"
|
||||
git fetch origin main
|
||||
git reset --hard origin/main
|
||||
git fetch origin
|
||||
git checkout main
|
||||
git pull origin main --ff-only
|
||||
git clean -fd
|
||||
else
|
||||
log "Cloning repository..."
|
||||
git clone -b main "$REPO_URL" "$DEPLOY_DIR"
|
||||
git clone "$REPO_URL" "$DEPLOY_DIR"
|
||||
cd "$DEPLOY_DIR"
|
||||
git checkout main
|
||||
fi
|
||||
success "Repository updated to latest main branch"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user