I just updated my personal website with a few small improvements.
I think I'm most proud of my new 404 error page:
https://www.paulshryock.dev/not-found/
So sick of seeing "oopsie whoopsie!" and other nonsense on 404 error pages. Just tell me what went wrong and how to fix it.
Heyyy @zachleat, I got a funny one for you... I'm trying to run the Eleventy dev server in a GitHub action so I can make some GET requests against pages I've built with Eleventy and then make some assertions about the response markup. This works locally, but not in GitHub Actions. Wondering if you could take a look at my setup -- any suggestions in terms of how I'm using?
Runs before: https://github.com/paulshryock/personal-website/blob/main/tests/acceptance/setup.ts
Example test suite: https://github.com/paulshryock/personal-website/blob/main/tests/acceptance/seo.test.ts
Failed workflow: https://github.com/paulshryock/personal-website/actions/runs/9882383676/job/27295124728
@zachleat GitHub Action acceptance test output:
Server error: listen EACCES: permission denied 0.0.0.0:666
@paulshryock we *could* debug this or you could use Eleventy programmatically and get the same thing for cheaper. Have a look at EleventyTest.js in the 11ty/eleventy repo for examples. Even easier with virtual templates at the bottom of the file
@zachleat thanks for taking a look and the quick response. I appreciate the feedback, and I'll report back if I find any interesting takeaways.
I also realize this could be something like a network restriction on GitHub... they might not want me spinning up a server on their dime. Either way I'll dig in some more and see what I can find.
@paulshryock If you really want to go down that road, I’d start with creating your own little web server in node: https://github.com/11ty/eleventy-dev-server/blob/55099ca1573d6f35b97c7e26bc17b2efbcccb9b5/server.js#L652-L654 via https://nodejs.org/api/http.html#httpcreateserveroptions-requestlistener
@zachleat Thanks for the suggestion! I replaced Eleventy Dev Server with a simple Node server and that did the trick. The server now runs on a GitHub action while my acceptance tests run and pass, and then the server shuts down and the build passes.