Please, turn your phone in landscape mode
Automating side projects
Who am I?
Tim Carry
Public Speaking Coach
Indie Hacker
@
pixelastic
Tim Carry
TechLunch
HumanTalks
Algolia
Side project life cycle
💡 You have an awesome idea
👷‍♀️ You build and deploy it
🥰 Everybody is happy
⌛ Time passes
👩‍⚕️ You go back to fix a typo
🔥 Everything is broken

Deps are out of sync

Forgot the codebase

Does not happen with work project

  • Always on it
  • Codebase in mind
  • More stakes
Real-life example
I play
every Sunday

As a GM, I need to tell a story for my players

I read published material for inspiration

320+ published adventures
What I want
📦 Automated library updates
🕖 Automated data update
💔 ...without breaking anything
pixelastic
/
society-website
// package.json
"dependencies": { "algoliasearch": "^3.35.1", "instantsearch.js": "^4.1.1", "lazysizes": "^5.2.0", "lodash-es": "^4.17.15" }
pixelastic
/
society-data
// data.json
"stayOfExecution": { "title": "Stay of Execution", "authors": ["Alison McKenzie"], "backcover": "When a petty thief named Hadge gets a lucky break and makes off with a powerful divination focus of the Pathfinder Society's masked leadership, you and your fellow Pathfinders set out to the sparsely populated Taldor frontier to find him and recover the focus. When the local governor tosses Hadge into the brutal Porthmos Prison for a minor crime, your mission suddenly becomes a jail break. Will you free Hadge and uncover the location of the focus before the gangs of Porthmos tear him apart?", "locations": ["Taldor", "Sardis Township", "Porthmos Prison"], "price": 3.99, "rating": 2.3, …}
Manual automation
pixelastic
/
society-website

$ yarn upgrade --latest

Update dependencies
$ git push
Deploy the website
pixelastic
/
society-data
$ yarn run regenerate
Recrawl pathfinderwiki.com
$ yarn run algolia
Push data to Algolia index
📦 Keeping libraries up to date

Automatically merge patch and minor

Creates PR only for major

💔 ...without breaking anything
ci/circleci: ci
— Your tests passed on CircleCI!
Renovate will
merge to master
ci/circleci: ci
— Your tests failed on CircleCI
Renovate will
create a Pull Request
What I want
✔ Automated library updates
🕖 Automated data update
💔 ...without breaking anything
🕖 Scheduled runs
# .circleci/config.yml workflows: … weeklyUpdate: triggers: - schedule: cron: '0 9 * * 2' jobs: - weeklyUpdate jobs: weeklyUpdate: steps: - … - run: 'yarn run weeklyUpdate'
$ yarn run weeklyUpdate

Create an issue if error

Allow me to manually check before merging

Crawling is hard. Especially user-generated content

I don't trust my own script that much

Using Octokit for create Issue/PR

🔎 Updating the Algolia index
➡️
?
➡️
🔎 Updating the Algolia index
with webhooks
➡️
GitHub Webhooks
➡️
🔎 Updating the Algolia index with webhooks
and CircleCI
➡️
GitHub Webhooks
⬇️
CircleCI
➡️
🔎 Updating the Algolia index with webhooks and CircleCI
and Netlify
➡️
GitHub Webhooks
⬇️
Netlify Functions
⬇️
CircleCI
➡️
Debugging
GitHub Webhooks
CircleCI
Sentry
Netlify Functions
Drink
coffee
, merge
PR
and
carry on