Create Project Templates for Netlify
Problem to Solve
GitLab users should be able to create a new project using a Netlify template in order to create a static website easily. Netlify has nice features and for those who prefer to use it, we can set up new project templates that allow them to easily use Netlify for static site CI/CD, while also taking advantage of GitLab repos, merge requests, issues, and everything else.
Potential MVC Implementation from @jlenny
I just tested this out to see how Netlify works and all you need to do from the Netlify side to enable CI/CD is point to the GitLab repo. So a minimal workflow to put a static site on Netlify but get GitLab projects, source control, issues, etc. is:
- Create a new project, use any (as far as I know) of the common static site generator templates I added recently
- In your new project delete the .gitlab-ci.yml to disable GitLab CI/CD
- Log in to Netlify and point it to your new project's repo, and it will figure out the rest.
That's something quite close to an MVC already right there. The manual step to delete the .gitlab-ci.yml is really the most egregious step, and it's not that bad.
One note here, Netlify works with static site generators just like Pages. It doesn't have its own preferred framework. So you'd have things like Netlify+Hugo, Netlify+Jekyll, etc. One way could do this is duplicate the
Pages/Jekyll options on the page below with
Netlify/Jekyll and so on, with the Netlify logo. They would essentially be identical, but tested to work with Netlify in case there are any subtle differences, no
.gitlab-ci.yml included (and hopefully no AutoDevOps try), and a section in the readme about how to point Netlify to the repo - which is really straightforward.