We propose an implementation of a generalized Su-Schrieffer-Heeger (SSH) model based on optomechanical arrays. The topological properties of the generalized SSH model depend on the effective optomechanical interactions enhanced by strong driving optical fields. Three phases including one trivial and two distinct topological phases are found in the generalized SSH model. The phase transition can be observed by turning the strengths and phases of the effective optomechanical interactions via adjusting the external driving fields. Moreover, four types of edge states can be created in generalized SSH model of an open chain under single-particle excitation, and the dynamical behaviors of the excitation in the open chain are related to the topological properties under the periodic boundary condition. We show that the edge states can be pumped adiabatically along the optomechanical arrays by periodically modulating the amplitude and frequency of the driving fields. The generalized SSH model based on the optomechanical arrays provides us a tunable platform to engineer topological phases for photons and phonons, which may have potential applications in controlling the transport of photons and phonons.