The first thing that I feel like I have to say is how wonderful of a time that I had at Laracon US in Chicago. The speakers spoke on a wide variety of subjects, ranging from coding practices, time management, having a timeless product...such a wonderful experience!
For the first time in awhile, though, there was not going to be a livestream ticket available for attendees who wouldn't be able to make it to Chicago. To be fair, the venue did not have terribly good access to Wi-Fi as it was, and slamming it with 800 other devices trying to connect to the network (as well as devices connecting from regular museum-goers) would have been too rough to handle, I imagine. Along those same lines, I want to contribute to some way to Laravel.
So hey, I'll keep a running blog of what's going on!
While I'm not terribly active in the Laravel community, I've been working on being active in Atlanta's PHP community, most notably by giving talks at the AtlantaPHP user group meetup. A few weeks ago, I volunteered to give a 15-minute talk about static site generation, which is something that I had started using on my personal site (you know, this site). In some of the back and forth emails between Chris Spruck and me, he brought up Netlify as something related to static site generation. Based on that and their sponsorship of the Syntax podcast, I signed up for an account.
Well, how can I keep a running blog going? I'd want it to have to deploy pretty darn frequently, and the more steps I could off-load to other services, the better. While I had recently switched to an unlimited data plan, I didn't want to get close at all to using up my hotspot plan (10GB at 4G speeds, very slow afterwards). So hey, I'll build the blog using Jigsaw, as I make changes, I'll commit code automatically and push it up a private GitLab repository, then I'll tell Netlify to watch that GitLab repository and run Jigsaw's build command and deploy.
So those were a number of steps, but if done right, I could just write HTML/Markdown, save frequently, and the site itself would get automatically updated every minute or so. Sounds great!
I looked at the clock in my hotel room. It read 7:54am; I had roughly 15 minutes before I wanted to leave for the venue.
Let's do this.
So now that I have the site up (sort of) and going (mostly), time to leave for the venue!
I got to my seat a few minutes early so that I could continue my setup. Since I knew I was going to deploy pretty frequently, I went ahead and wrote a cronjob to commit all changed files and push it up to my GitLab repository:
* * * * * cd /Users/chris/Projects/laracon && git commit -am 'Minute progress' && git push origin master
I tested with a few commits, and it looked like it was working. Awesome! Let's get rolling! I typed a few words or a line at a time, then I'd save my file, keep typing, rinse and repeat.
I'm writing this part of the blog post on Saturday, July 28th, so my memory isn't quite as fresh as it could've been, but here are a few specific things that I remember:
And just as a fun bit, here's a timelapse of the index page of the blog over the course of each commit!
So here are the different technologies that I used, and how I used them
I need to send a Thank You/Sorry card to be sent to Netlify's corporate office for hitting their service to redeploy the site literally once a minute for around 16 hours.
After all was said and done I had made 612 commits, resulting in around 595 deployments (a few deployments either failed or were skipped in favor of later commits). I have no idea how many site visitors I ended up getting (since I did not add analytics). However, here's some data that I pulled from Twitter (the only place where I advertised the blog):
I'll keep the site up indefinitely, but I'll make a few changes over the next few days like fixing typos, adding in links to slides, and eventually the talk's video link once those get released.
I honestly enjoyed the experience; it was rewarding to me that so many people got value out of it. On the second day of the conference, a few people thanked me in person for doing the blog (to help them corrorobrate their notes, so they could share the link to people who couldn't make it to Chicago), and I got an offer of help from someone to work on a different way of handling updates (through sockets, auto-updates). It's been so far the best way that I've connected with the Laravel community, and I do plan on doing it again at next year's Laracon US conference!