Previous studies revealed that traditional methods of damage detection (e.g., visual inspection) are time-consuming and require large monetary resources. In the last three decades, machine learning algorithms, sensor technologies, and computer science have progressively advanced, which paved the way for implementing machine learning-based damage detection frameworks. This paper presents a damage detection framework for civil structures using machine learning algorithms. The decision-tree classifier is used to classify the state of damage in the building based on the damage indicators obtained from the output acceleration signals of the building. The braced-frame structure known as the IASC-ASCE structural health monitoring benchmark building was used to verify the presented approach. The total number of 6000 Gaussian white noise signals with 10s length was applied to the case study model as ambient vibrations using the Matlab platform. Five different damage indicators, including the vibration intensity, mean period, mean, variance, and the fundamental frequency of the structure, were used to train the classifier. A Bayesian Optimization algorithm was implemented to tune the hyperparameters of the decision-tree classification learner. The results indicate that the proposed approach could estimate the state of damage in the building with promising accuracy.