Doing stupid stuff with GitHub Actions
devopsdirective.com
devopsdirective.com
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...
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.
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.
I do the same thing for my https://github.com/simonw/museums site.
I have seen people doing fun things with GitHub Actions for the new GitHub profile readme feature as well.
This community chess game is one of my favorites https://github.com/timburgan/timburgan
It uses the creation GitHub issues on the repo as the input method/trgger which is a pretty clever hack.
Didn't realize it was you -- great post!
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.
(Thanks that's a nice share!)
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).
This is possible with GitHub Actions, too: https://docs.github.com/en/actions/hosting-your-own-runners/... (the place I work at uses it.)
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).
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!
I figured if I was going to learn a new tool, I might as well have some fun along the way!
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 looks like it supports all of the API routes you would need including:
https://github.com/actions/github-script/blob/b507739f17c210...
To actually perform the release update.
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
Most of the credit goes to Alex Shpak (https://github.com/alex-shpak/) who created the "Book" theme for hugo (https://themes.gohugo.io/hugo-book/).
Almost all of the load is handled by CloudFlare though.
If I didn't have those secondary goals, I would have either:
1) Hosted on Netlify
OR
2) Hosted in an S3 / GCS bucket