root: CI/CD optimisation
Tasks
-
move typecheck
task to a different job -
optimise yarn
install cache, so only used .zip packages are cached -
only install --production
packages for build -
use --concurrency=100%
instead of arbritary number -
only build websites that were modified -
only deploy websites that were modified -
use a single deploy job for production(jobs are executed by the same runner, so not really important to make them a single job)
Optimisations
- Original 17m26s
- build 17m04s
- First 7m21s
- Cached 6m25s
- Pre-process 7m50s
- Single change 6m08s
- Docker turbo 6m44s
New rules
Dependencies (packages, libraries, etc) used at compile/build MUST be installed as production
dependencies. ESLint, prettier, and any other development-related depedencie should be installed as devDependencie
. This way, the pipeline installs less packages and is faster.
Edited by Fabio Maschi