According to reported story in the bible,when joseph discovered that mary was with a child,he got a revelation that it was through the power of the holy spirit.
Subsequently,the bible was silent concerning the actions that joseph took later but events show that there was a secret legal separation between the two .
My reasons are as follows:
-Joseph was not present at the miraculous conversion of water into wine
-joseph was not present at the scene of the crucifixion
-joseph was not present on the pentecost day with other disciples