I created two repositories on : https://github.com/new
The private project for my source code organiser, git-url: git@github.com:paven/organiser.git
gh page project organiser_beta: git@github.com:paven/organiser_beta.git
This first step required me to create a react kotlin app and hook it up to github:
yarn global add create-react-kotlin-app create-react-kotlin-app organiser yarn add gh-pages cd organiser git init git remote add github git@github.com:paven/organiser.git git commit -a -m "You can read about the create-react-kotlin-app here: " git push -f github master create-react-kotlin-app
And the git commands: git/docs
By now I had my source project created and up on github, but the gh-page was not up and running, for this I needed to do some editing to the configuration. The guide i looked at "How to deploy your react application to github pages" was pretty strait forward, but it defaults to sending to the origin repo and I wanted to send to a second github repo so i hade to figure some things out from npm/gh-pages.
So i modified my package.json (int the organiser repo) with the this:
{
...
"predeploy": "yarn run build",
"deploy": "gh-pages -d build --repo 'git@github.com:paven/organiser_beta.git'"
...
}
yarn deployResulting in some joy from me, I figured this was a twitter moment
Though the page was mysteriously white it was a smale win. After investigating the webcode I realised that code tried to load from organiser instead of organiser_beta. I needed to change the first value in package-jsonPlaying around with a kotlin-react-gh-pages app. Stage 1 - doing nothing https://t.co/SRncgdmBGC ✌️— Patrik Gustafsson (@paven) October 26, 2019
{
{
"name": "organiser_beta",
...
}
and after yarn deploy this it was a second twitter moment.— Patrik Gustafsson (@paven) October 26, 2019Tada!
More react: https://medium.com/@ralf.stuckert/getting-started-with-kotlin-react-c5f3b079a8bf