Shopify / lighthouse-ci-action

MIT License
100 stars 50 forks source link

Switch to shopify-cli #7

Closed charlespwd closed 3 years ago

charlespwd commented 3 years ago

In this PR, we move away from themekit and to shopify CLI for a couple of reasons:

  1. Use development themes (these don't show up in admin and get cleaned up automatically after a period of inactivity (even though we do try to clean them up with a shopify logout))
  2. Use shopify push --development --json to simplify the code a lot, making creating ephemeral themes faster with less chances of things blowing up.

Concerns:

1. Installing ruby in the Docker image takes a lot of time and might make things slower overall. Would have to benchmark. Perhaps it would be worth creating and pushing our own docker image?

I added a Dockerfile.base and a Makefile. I'm deploying those to dockerhub to download as base (cpclermont/lighthouse-ci-action:1.0.0). This makes the install ruby + npm part (almost) instantaneous.

Leaving us with shopify push --development --json $theme_root as the primary bottleneck of this CI action. But it's still faster than themekit.

Fixes #4