I didn't disclose a foreign contact

I met my girlfriend in January 2017. She is here on a student visa,
enrolled in a PhD program. She is a Chinese national.

I have a TS/SCI, but during the time we met, I was working a
non-cleared job. I got a cleared job that required a TS/SCI in
June 2017. I worked the job from June 2017 to March 2018, but I didn’t
report her as a foreign contact during that time.

I quit my job in March 2018, and have been on a sabbatical since
during which we got married. My question is, if I choose to work a
cleared job again, should I disclose my marriage prior to accepting a
position, or after?

Regardless of whether you were in access or not when you started the relationship with the Chinese national it should have been reported if you maintained eligibility for access to classified information. If you wish to have your clearance eligibility reinstated then yes, you must report the marriage to a foreign national. Also, better to be up front about it with your employer rather than them finding out afterwards.