Hello, I am hosting all my websites and webapps in GIT at Bitbucket. Untill now if I have updates regarding my code I upload my code manually to my live server, not really handy ofcourse I know. So I am trying to install GIT with post-receive on my live server but it's not working all the time (I don't have a lot of knowledge regarding servers).
I was wondering if there is some other way to connect my Bitbucket repositories to my live server? If so, how? Thanks in advance.
Hello @Rowdysign ,
Thank you for reaching our to community.
You could make use of Bitbucket Pipelines in order to deploy the code in your repository to another server.
To start using pipelines, you will have to create a YML file named bitbucket-pipelines.yml in the root of your repository repository. In this YML file you can configure a series of steps and the scripts to be executed in each step whenever the pipeline is triggered. For example, if you want to execute your deployment scripts every time a push is made to master branch, your YML file would look like the following :
pipelines:
branches: #these will run on every push of the branch
master:
- step:
script:
- <command 1>
- <command 2>
For more details on the different trigger options you can use in the YML file, and guidance on how to configure it, you can refer to the following documentation :
Specifically for deployment, we have several pipes that can be used as commands in the script section of your yml file, and help on automating the process. Allow me to share a few examples :
We also have pipes that facilitate the deployment to cloud services, such as AWS, Google Cloud, Azure and so on. For a full list of available pipes you can refer to below link :
Hope that helps. Let us know in case you have further questions :)
Thanks, @Rowdysign .
Kind regards,
Patrik S
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.