Instead of wget-ing localhost, maybe it's better to use Frozen-Flask[1] instead. I use it to implement my own static site generator for my personal website and it's working great.
Heh, I worked on a site for a brand during the 2006 World Cup that did basically exactly this (although a PHP site, and a slightly rickety manual build process). They had bought pitchside advertising to be shown during the final, and anticipating enormous traffic which sadly never materialized. But we totally could have handled it!
Other over-optimisations on the same project included going all the way and including functionality to handle drawn lots as tie-breakers. This also never happened.
I was trying to look into GitHub actions but didn't really understand it. I just straight up called CLI commands eg. $git commit -m "..." and ran those after I put a key(in my case on a pi) and it does commits by CRON. I was just publishing sensor data to my GitHub readme. But it's cool that it works.
The site already existed, but they wanted to serve it statically to save on complexity and money.
If you dig into the repo you'll see that it's maintained using a YAML file, which is a smart way to deal with small sites that still contain structured content.
1. because the people writing the content are not developers.
2. there’s dynamic content, but when you know you’re going to get a large influx of traffic from a single region/event, you can precompute it for a short period.
It's smart because it's a solution to a problem (freezing dynamic content) in one line of code, the wget command. It should work for most cases and it's easy to understand and deploy.
For anybody interested in playing around with and hacking on different CI / devops stuff I recently launched https://boxci.dev, which is a distributed CI service where the builds run on your own hardware, via a lightweight runner that just does coordination and runs build shell commands on bare metal, so it's a bit more hackable / flexible than (for instance) GH actions / Gitlab CI.
It's free to sign up and play around with it, and I'd love to get the feedback of any HNs who think this could be useful (I basically built it because it's the CI service I want to exist, and I think others might too).
As someone who's a bit newer to CI/CD, this solution would be ideal if you don't want to host Jenkins yourself right?
I just give you access to my GitHub repos, install the agent then whenever I commit something into GitHub, the agent will see this and perform the task/pipeline right?
Similarly to how Jenkins works, except I don't need to install Jenkins - I just install the agent instead.
And just to emphasise, even the agents are totally ephemeral and don't require much management effort on your side - you can install and spin them up/down on any machine at any time just through shell commands and the service automatically manages this agent pool and sends builds to it - no manual steps at all. If no agents are running, builds just sit in a queue.
If you'd be interested in playing around with it and have any questions, please feel free to email me (email's in my profile).
Yep! We've been doing this at Buildkite for six years now. We're lucky to have a lot of fantastic customers who have helped us learn over the years what makes a great hybrid SaaS/self-hosted CI solution.
The "Holiday Reminder" could actually send a somewhat puzzling notification about you needing to check out the GitHub pipeline for a production failure. I would for sure forget about even setting it up and would shit my pants on New Year's Eve... and then have a good laugh on myself.
Haha, good point... I have another 5 months to fully forget that I ever set this up.
The name of the action does get included in the email notification so hopefully I'll be able to decypher it, even after some NYE celebration champagne!
Reminds me of my first year in college, when we'd log into each other's machines at the computer lab for some intro to computing class, and launch a fork-bomb script that simply launched itself twice, quickly rendering the machine useless. The tricky part was to test it without halting your own machine, as a newbie programmer and Unix user.
Unlike the authoer, I haven't found Github Actions very intuitive to work with :)
I've asked this before on a similar post, maybe someone here knows. Has anyone managed to get a Pre-Release to track Master using Github Actions? I can't seem to find a working example that does this (and I can't seem to cobble one together myself)
There are a few things that are seemingly intentionally left out of GitHub Actions... like you can create new Releases on a push, but there is no direct way to delete/update a release with fresh builds.
I know you can just get build artifacts - but those are not publicly available and hard to link people to.
it's strange to me this isn't a first class feature
Thanks for the tip. I don't really know JS so I may dig into this if it becomes a major burden. For the time being I'll just manually delete the prerelease between pushes
Alternative idea for exponential action: action that creates another action (automate a headless browser, or maybe github has an api for that?). Kill switch: delete the repo :)
It's nice but it could be cleaner, by dropping the sidebar, and constraining the width of prose. See "Why is the text on your site so narrow? It wastes screen space." here: http://www.paulgraham.com/gfaq.html
1. Spin up a Python Flask web server on localhost
2. Run "wget --mirror" against it to crawl the site and save it as static files
3. Publish the resulting static files to GitHub Pages
The workflow is here. It's genius: https://github.com/pubstandards/pubstandards-london/blob/899...