rafgraph / spa-github-pages

Host single page apps with GitHub Pages
https://spa-github-pages.rafgraph.dev
MIT License
3.83k stars 565 forks source link

Update README for further clarification of instructions #62

Open lucitemple opened 1 year ago

lucitemple commented 1 year ago

Hi,

I'm trying to implement this however am confused by the instructions, and hope you can provide further clarity.

I have an existing project that runs locally, however doesn't work properly when deployed to github pages due to react router conflict.

Of the detailed instructions, I clicked the link to go to version 6 (js option), and I followed steps 1-3, with the 'adding this boilerplate as the gh-pages branch of an existing repository' option.

When it gets to step 6, I get the below error.

Screen Shot 2022-10-11 at 9 53 33 am

In hindsight I see that these instructions don't ensure that the js version is downloaded run, following the instructions results in the typescript version.

So I scrapped it and restarted, this time manually downloading the zipped 6.0 package

I got to step 7 this time, before getting this fail error when pushing

Screen Shot 2022-10-11 at 10 19 20 am

And I realise that the SPA packages operates on the assumption that you haven't already tried to install onto gh-pages previously... many people only come to the SPA package after failing from usual method.

So I worked out I needed to push --force the last command.

Step 8 - confusing, I already have my own site, on the main branch. Are these instructions to be done on the gh-pages branch or the main branch? I follow these instructions assuming on the gh-pages branch.

I get a blank page on GH pages.

I try the instructions for local deployment, and it works to get the boiler plate content hosted locally... but how to I get my own site hosted? Do I merge main to gh-pages?

I read back over the instructions, this time look at the 'basic instructions' which say something different...

Does step 1 of basic instructions occur on main or gh-pages branch? Is this in addition to the detailed instructions or is it an alternative?