Skip to content

Latest commit

 

History

History
30 lines (22 loc) · 1007 Bytes

README.md

File metadata and controls

30 lines (22 loc) · 1007 Bytes

commit-sudoku/animation

Code to generate an animated GIF showing evolution of the Sudoku board.

Requirements

  • Node 6+

Running locally

cd animation
npm install
npm run generate

Uploading GIF to surge

Surge.sh is a platform for easily publishing static websites and content.

To publish the generated GIF to Surge.sh, generate a token and provide it via environment variables:

SURGE_LOGIN=<your login email> SURGE_TOKEN=<Surge token> CI=1 node ./index.js

How it works

  1. Get list of commit SHAs using git log
  2. For each commit, get state of the Sudoku table using git show ${SHA}:READEME.md
  3. Render each state in headless browser via Puppeteer to PNG
  4. Create animated GIF from generated PNGs using gifencoder
  5. Optionally, upload generated GIF to Surge.sh