Arquisoft / viade_en3a

Viade En3A
https://arquisoft.github.io/viade_en3a/
1 stars 4 forks source link

Git-hub pages building question #50

Closed fincamd closed 4 years ago

fincamd commented 4 years ago

We were trying to test the functionalities of the HTML pages routing system you talked us about last lab session. The case is that we don't know how to build the content into gh-pages. Maybe we need to merge changes into gh-pages branch? Or maybe if Travis detects unsuccessful tests it doesn't build the page

@labra

jesQM commented 4 years ago

This would be the fork in which we are testing whether routing works correctly in github pages. And the problem is described by fincamd above, travis not working.

labra commented 4 years ago

Travis is configured to deploy only after successful tests and only from master branch so you should ensure that the tests pass and merge to master

jesQM commented 4 years ago

So, I just enabled travis in the repo (which looks like it is not enabled when forking) and now its giving me this error when building:

viade_en3a@0.1.0 deploy /home/travis/build/jesQM/viade_en3a gh-pages -d build remote: Invalid username or password. fatal: Authentication failed for 'https://github.com/jesQM/viade_en3a.git/' npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! viade_en3a@0.1.0 deploy: gh-pages -d build npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the viade_en3a@0.1.0 deploy script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! /home/travis/.npm/_logs/2020-03-08T12_25_40_896Z-debug.log The command "npm run deploy" exited with 1. cache.2 store build cache Done. Your build exited with 1.

I did create a variable with repo permissions and named it github_token (couldn't find whether that name was the one to be used or a different one could), yet it gives me that error. However, it can be seen that I installed gh-pages, that was because this part of the log recommended me to do so:

The project was built assuming it is hosted at /viade_en3a/. You can control this with the homepage field in your package.json. The build folder is ready to be deployed. To publish it at https://jesqm.github.io/viade_en3a/ , run: npm run deploy Find out more about deployment here: bit.ly/CRA-deploy

Not sure what part i am messing up in 💩

Edit: Did also remove tests, so they all pass now (and removed codecov, as it was complaining too)

jesQM commented 4 years ago

So... its done! 😄 https://jesqm.github.io/viade_en3a/#/pricing

The project is indeed compatible with gh-pages. Checking an issue posted by a classmate in another project, it seems the problem is caused by the type of routing, luckily, I was already using the correct one.

To upload the project to github pages I wasnt able to repair travis, so I built the project myself and uploaded to master branch the build.