The directed movement of bile acid and bile salts out of a hepatocyte and into the bile canaliculus by means of an agent such as a transporter or pore. Bile canaliculi are the thin tubes formed by hepatocyte membranes. Bile acids are any of a group of steroid carboxylic acids occurring in bile, where they are present as the sodium salts of their amides with glycine or taurine.