Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Can BitBucket Cloud host React websites?

do-kevin
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 6, 2018

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?

1 answer

0 votes
Ana Retamal
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 10, 2018

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

do-kevin
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 24, 2018

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?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events