coopdevs / coopdevs-old-web

coopdevs.org content
http://coopdevs.org
2 stars 10 forks source link

Build site locally #33

Closed sauloperez closed 5 years ago

sauloperez commented 5 years ago

In #31 we start using a Jekyll plugin that is not supported by Github. This means we can no longer rely on Github's build process and we have to do it ourselves locally and then push the static files to Github pages.

We can use something similar to https://gist.github.com/SirRawlins/8684701 or https://gist.github.com/motemen/8595451 to automate this process.

Another solution could be to use Travi's Github pages deployment support but it feels a bit overengineering to bring an extra dependency on a 3rd party service to do this.

sauloperez commented 5 years ago

There's a message in settings User pages must be built from the master branch. and I can't select gh-pages branch :sob: Looks like we'll need to convert it to a project page.

enricostano commented 5 years ago

I don't really like moving the build step outside GH Pages. Look at my comment in #31 for more details.

sauloperez commented 5 years ago

Agree but now it's urgent to have this done ASAP so that we can merge #31 and send the job offer. I just created https://github.com/coopdevs/coopdevs.github.io/issues/36 to keep track of it.

I'll move on with this as a temporal solution.

sauloperez commented 5 years ago

Ok, after careful thought and discussion and given GH's constraints regarding pages, here's the plan.

New branching model

master becomes the deployment branch. It holds the static files Github pages will serve. develop a new branch with the project files (markdown, config, etc.), exactly what master contains now, becoming the default branch.

Build & deploy script

I'll open a PR with a deploy script that builds the site and pushes the resulting static files to master. Note that this needs to be executed from develop or whatever branch you want to deploy.

As a result, we don't need to change settings whatsoever.

However, if things complicate we will need to finally spend time on https://github.com/coopdevs/coopdevs.github.io/issues/36

sauloperez commented 5 years ago

Yay! it worked smoothly! I just deployed using the new script.

I like the way master looks now. You can easily see what was deployed.

captura de pantalla 2018-12-21 a les 12 23 51