I would like to publish images, env public folder link & react app - reactjs

I have recently created my react portfolio website, and would like to publish it for free using github pages, or any other free domain. I don't know how to do so, as I have multiple things. I have my public folder will my projects images, and I also have my .env file with hidden information. How can I do this all?

Did you tried GitHub Pages?
All that you need to do is to create repo with your's github nickname and commit all your changes into this repo. Not sure about .env file and GitHub Pages, needs some research.
GitHub Pages - https://pages.github.com/

Related

React code is not visible properly in gitHub repository

I uploaded a react app on github repo and after pushing the code, I am seeing a new static folder instead of public and src folders, and the code is non readable in the repo.
https://github.com/Rohitkumar123github/random-suggestion-using-api
It will be easier if someone visit and see it.
I am new to github and i saw some videos on github hosting websites and when i tried to host my website i am seeing this static folder in my main branch instead of public and src. I want to use github to show my project source code and a running website to potential hires. But the source code is non readable right now.
did you add the src, public, and other folders that you said in the .gitignore file? check this file, those folders mustn't be in the .gitignore file;
and check out that did you add those folders to the git stage before committing? (git add -A)

Publishing a React Website on Bitbucket Cloud

I'm trying to Publish/Host a ReactJS project on Bitbucket. the project was bootstrapped using create react app, therefore the index.html file is within a public folder i.e. root/public/index.html.
i have followed the instructions on https://support.atlassian.com/bitbucket-cloud/docs/publishing-a-website-on-bitbucket-cloud/ but i cant seem to get the site to show.
the url's i have tried are [workspaceID]/ui-library.bitbucket.io and [workspaceID]/ui-library.bitbucket.io/public (ui-library being the repo name). Both of these return repo not found or just google search results.
am i doing something wrong here? i'm new to Bitbucket, i would have previously used GitHub and GitHub pages for things like this.
thanks...

pushing whole react folder to github

Im new with git stuff. I wanted to push my react project made with "create-react-app" into github and make it work with github pages. So i followed some tutorial and it basically worked so i could preview it on a github page. But now i want to push whole folder of my react project instead of only files. To make it working i deleted .git folder inside my app folder and initialized one outside. I ended up pushing it to my github repo but i cannot live preview my site for some reason.
https://github.com/Adrian397/react_projects - here is how it looks like (there is main folder in master branch)
This is how my package.json looks like.
I dont know if the "homepage" is written properly but i tried to change it to "homepage": "http://Adrian397.github.io/react_projects/expenses" (react_projects is my whole repo and expenses is my folder that i pushed into github) but still did not work.
Is there any other way to do it because it is kinda weird if i had to create a new repository for every react project instead of having them separeted in one global repository?

Unable to choose src for github.io portfolio page

For the main git repository, devanshdalal.github.io, I am unable to choose the src branch to use for deploying, github.com always picks up the master branch. It becomes difficult now, because I now have to push my build/ forlder to master. Is there a way to automate this?
Currently github doesn't support choosing custom folder for repo named like {GITUSER}.github.io -
From community help post
From https://help.github.com/articles/configuring-a-publishing-source-for-github-pages/, the only three options that GitHub Pages recognizes are:
master branch
docs/ folder on the master branch
gh-pages branch
But for repo like {GITUSER}.github.io, having docs/ folder also doesn't work(I couldn't make it work). I faced this similar issue a while back. I was using jekyll to build the static pages for my site. I know It's really frustrating, but as of now what you want, is not possible.
However, I made a workaround to version-control my jekyll project as well the generated static github.io pages.
I maintain a separate repo for the jekyll version of the project(which in your case I guess would be the react project). So locally I have two separate repo -
{my_username}.github.io - > which will contain the static pages, and remote for this local repo would be the {my_username}.gihub.io repo(the static site repo).
I also have a separate repo for the jekyll project. Which has a different remote repo setup. I configured settings for this project in such way that after build, the static pages will be saved in the local repo of {my_username}.github.io folder. then I can just commit and push separately in the two repos.
This way I can keep track of the static pages as well as the jekyll project that builds the static pages.
You only need to make sure that before you configure a publishing source, the branch or folder you want to use as your publishing source already exists in your repository.
This link GithubPages will solve your problem.

Commiting a google web app project to github

I have a google web application project that I want to host on github. I'm familiar with the basics of github. I have committed simple java projects. But how do I commit a google web project so that a user can just import the project from github and its created.
Do I just commit all of the source code. Then anyone who wants to import the project just creates a new project and re-imports the code from github into his/her newly created project ?
You should commit all the source code project folder like:
YourProjectFolder/
app.yaml
application.py
lib/
foo/
One potential user will:
Clone the source folder from github.
Select Add existing, from the GAE Sdk dashboard, specifying the cloned source folder.

Resources