DEV Community

Discussion on: I Created My Portfolio with React and Some Magic 🎉

Collapse
 
sanbeaman profile image
sanbeaman

Great Article!
What is your build and deploy process?
I know that the "master" branch has to contain the compiled files in order for user.github.io pages to work, and I see you have a "dev" branch that contains your source files.

Looking at your package.json
"deploy": "aws s3 cp build/ s3://dineshpandiyan.com --recursive"

How are you building the files and moving just the contents of the "build" folder from the "dev" branch to the "master" branch? via webhooks?

thanks,
drew

Collapse
 
flexdinesh profile image
Dinesh Pandiyan

Hey, I use gh-pages library for that.

Previously my code was
"deploy": "gh-pages -d build -b master"

I recently changed it to
"deploy": "aws s3 cp build/ s3://dineshpandiyan.com --recursive"

because I bought a new domain - dineshpandiyan.com. I haven't acted on it because I'm yet to setup https in it.

gh-pages pretty much takes care of everything. But it will also delete all your source code in master branch. That's why my source code is in dev branch.