Degrading structural systems under seismic actions: a stochastic analysis