Hi there,
I am new to BitBucket; I am wondering if BitBucket can deploy single page React websites on BitBucket Cloud, like GitHub Pages?
Also, how do you deploy other repositories on BitBucket Cloud besides making a repository named after your_username.bitbucket.io?
Hi Kevin, welcome to the Community!
I don't see why you wouldn't be able to use it. Looks like what it would do is to create a branch which contains the static code for the React app for the website. I'm not familiar with React and haven't used it with Bitbucket, so I won't be able to confirm if this will work or not. I found some instructions at https://medium.com/@xueeey/build-and-automatically-deploy-a-react-site-4d5d6f07e4e8, I think it'd be worth it to give it a try. In this other blog you can find another example, but they're using Github instead.
For your second question, I'm not sure what you mean. Do you mean how to have multiple websites? If so, can do this by placing each project in a repository subdirectory. In this example, you would want to organize things such that you can point users to:
Each project sub-directory would act as a self-contained website with its own index.html
. For more info you can read Publishing a website.
Hope that helps you!
Ana
Hi, Ana!
Thank you for replying back and sorry for my late reply. Regarding my second question, are you saying that I create another folder in my accountname.bitbucket.io repository and add a respective index.html to it? So in order for me to see the deployed website, I have to enter https://accountname.bitbucket.io/folder/folder.html?
The reason I asked my second question is because of my familiarity with GitHub pages. On GitHub, you can create a repository separate from the accountname.github.io repository. The user can then set it to deploy on the repo's GitHub pages and the url would be https://accountname.github.io/example-repo.
So I am wondering if BitBucket and BitBucket Cloud do a similar thing? Would that separate repository also have its own bitbucket url?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.