zuelong / save-the-spire

A save editor for the game Slay the Spire
16 stars 13 forks source link

Integrate Travis CI for deployment to GitHub Pages #31

Open Dima-369 opened 5 years ago

Dima-369 commented 5 years ago

You can see a live example here: https://gira-x.github.io/save-the-spire/ Here is the Travis CI page: https://travis-ci.org/Gira-X/save-the-spire

There are a few things you would need to change: The homepage in package.json needs to be changed and a GitHub private token set for Travis CI, as detailed in this guide: https://medium.com/@sumn2u/automate-create-react-app-deployment-to-gh-pages-using-travis-ci-b2a97203680b

This guide also has additionally information: https://facebook.github.io/create-react-app/docs/deployment#github-pages-https-pagesgithubcom

The deployment had the issue of not being able to load the potions.png initially, so I had to apply a hot-fix which is explained in the render() of Item.js.

I also fixed all warnings because the CI process handles warnings as errors by default, and there were just a few to fix :)