Forum

Need some help? Ask our community for its assistance!

You are not logged in.

#1 07-12-2019 05:24:07

francisbarton
Membre
Registered: 28-02-2018
Posts: 8

Continuous integration (CI) server solution for static site generation

Hi there

I was searching to see if there was a way of using Netlify with a self-hosted Git repo (I have a gitea installation on my account here). However Netlify will only work with GitHub, GitLab or Bitbucket.
So then I looked to see if there were any good alternatives to Netlify. I found Render but that only links to GitHub as well.

Then I found Caddy and I think this might do what I want. I wondered if it would be a good idea to offer Caddy serving here on alwaysdata please?
Or maybe there is already a way, with the software already available here, to implement a CI solution like Netlify, drawing automatically from a git repo when the repo is updated.

Thanks for your consideration - it would be great to be able to try out Caddy on my server space if possible.

Offline

#2 03-01-2020 14:57:03

francisbarton
Membre
Registered: 28-02-2018
Posts: 8

Re: Continuous integration (CI) server solution for static site generation

I've been thinking about this a bit more, and I think my initial ideas were not well-formed.

I'm working with an eleventy JAMStack site that is currently hosted on netlify, connected to a repo hosted on github. I am wondering how I can replace this with a similar setup here on alwaysdata.

I want a workflow like:
1. edit file on local machine
2. push to remote git repo (e.g. gitea on my alwaysdata server space, though it doesn't really matter where)
3. a hook triggers site rebuild and deploy

I can set up an eleventy site here (running on Node.js), I think.

The bit I am not sure how to do is:
- How to make this eleventy site automatically pull from the repo and rebuild/deploy when I make a new push. What would be a good tool to make this happen?

I think this is more of a help request than a suggestion now, so I will copy this and post in a different section of the forum.

Offline

#3 03-01-2020 15:13:01

@Cyril
Staff
From: Paris
Registered: 06-02-2007
Posts: 5,671
Website

Re: Continuous integration (CI) server solution for static site generation

Hello,

Sorry for not replying earlier to your initial message, it somehow escaped our radar.

You can run Caddy on alwaysdata. You basically need to create a new site (from the Web > Sites section) having the User program type, and specify the Caddy (or any other program, really) command line.

Regarding hook triggers, I don't know Gitea specifically, but have you tried the standard Git hooks? If you have a standard Git repository that you access over SSH, you can run any command when you do some action on your repository. So you could have Eleventy pull from your repo and rebuild static files.

Offline

#4 03-01-2020 18:59:07

francisbarton
Membre
Registered: 28-02-2018
Posts: 8

Re: Continuous integration (CI) server solution for static site generation

Thank you Cyril - I think alwaysdata allows me to do more things than I realised!
I will look into this more and maybe report back when I have got it working. I think I thought I needed an intermediate programme between the git hook and the rebuild - but maybe the hook itself, calling eleventy, is enough. That seems obvious now!

Offline

Board footer

Powered by FluxBB