Publishing Markdown posts from bitbucket to WordPress

It is possible although it would take quite a bit of initial setup.

I recommend learning about Bitbucket’s webhooks. This is how you would have Bitbucket essentially talk to your WordPress install. You would create a plugin or a theme template that has a physical url to it that you point the webhook to.

When a commit is made, bitbucket will send a payload to that url and a php script will update the existing post in the database based on the changes made. If it is a new markdown file, a new post is created, if the post already exists, it will update. This would of course be the hardest part of all of it.

See wp_update_post & wp_insert_post functions in the WordPress codex: