Check out examples using a Storage Block
here and
here. BitBucket very similar to the GitHub storage block.
Note that GitHub and BitBucket are read-only storage blocks, so you push your flow code to your repository manually - Prefect doesn’t do it for you as part of applying a deployment. Then, when you run your deployment, the code in your BitBucket repo will be used.