All commands are run from the root of the project, from a terminal:
Command | Action |
---|---|
yarn install |
Installs dependencies |
yarn run dev |
Starts local dev server at localhost:3000 |
yarn run build |
Build your production site to ./dist/ |
yarn run preview |
Preview your build locally, before deploying |
yarn run astro ... |
Run CLI commands like astro add , astro check |
yarn run astro --help |
Get help using the Astro CLI |
yarn run storybook |
Starts Storybook |
yarn run build-storybook |
Starts Storybook |
After setting up github pages to host storybook. Vercel's preview build was breaking on trying to spin up a preview branch.
This lead me down the rabbit-hole of learning how to ignore builds in vercel.
- Log into vercel
- Go to your project
- Then Settings > Git
- Scroll down to "Ignored Build Step"
- Add the following to ignore gh pages
[[ "$VERCEL_GIT_COMMIT_REF" == "gh-pages" ]] && exit 0
You can also add a script to get more fine-grained control. In my case I use
[[ "$VERCEL_GIT_COMMIT_REF" == "gh-pages" ]] && exit 0 || bash bin/vercel-ignore-build
Where bin/vercel-ignore-build is a script in this repository