When editing a page or shared block, editors has the option to set it as "Ready to Publish" when it is saved.
How can I give content this status programmatically?
It should be SaveAction.CheckIn,
var contentRepo = ServiceLocator.Current.GetInstance<IContentRepository>();
This will save publish every time. Episerver 8
Maybe forgot to filter a rendered list on published status?
Check filter for visitor below Episerver.Filters namespace in that case.