Flexible production-grade boilerplate with Next.js 11, Vercel and TypeScript. Includes multiple opt-in presets using Storybook, Airtable, GraphQL, Analytics, CSS-in-JS, Monitoring, End-to-end testing, Internationalization, CI/CD and SaaS B2B multi single-tenancy (monorepo) support
Is your feature request related to a problem? Please describe.
Optimize the heavy deploy-vercel-staging/production.yml workflows by running them only when related files have been changed.
Describe the solution you'd like
Ignore run when:
A Story has been changed (affects Storybook, not the Next.js app)
A change in .storybook is made
Another workflow is changed
.env, .gitignore files are changed
vercel customer files are changed (except for the default customer)
Basically, ignoring those files (or, allowing other files only) would avoid deploying needlessly, which would result in faster deployments, reduced feedback of what really matters, and lowering costs (GHA, Vercel)
Additional context
We've done something similar for storybook, using paths, basically using a "whitelist" and ignoring other changes:
on:
push: # Triggers on each pushed commit
branches:
- '*'
# Only run the workflow when there are changes made to files, in any of the below paths
# Optimize our CI/CD by not running Storybook needlessly (faster deploy, lower cost)
paths:
- '.github/workflows/deploy-vercel-storybook.yml'
- '.storybook/**'
- 'cypress/integration-storybook/**'
- 'src/stories/**'
- 'src/components/**'
# - 'src/*/components/**' # For later?
- 'package.json'
Is your feature request related to a problem? Please describe. Optimize the heavy
deploy-vercel-staging/production.yml
workflows by running them only when related files have been changed.Describe the solution you'd like Ignore run when:
.storybook
is madeBasically, ignoring those files (or, allowing other files only) would avoid deploying needlessly, which would result in faster deployments, reduced feedback of what really matters, and lowering costs (GHA, Vercel)
Additional context
We've done something similar for storybook, using
paths
, basically using a "whitelist" and ignoring other changes: