Try yarn instead over npm for storybook deploys (#12376)

* Try yarn instead over npm

* Remove ignore flag and use default flag

* Add yarn version

* Remove --docs

* Use NPM :( we don't have a yarn.lock in app/javascript

* Use NPM :( we don't have a yarn.lock in app/javascript

* Updated base to root to use yarn

* hack the command with cd 🙃

* debuggng

* copy package.json and yarn.lock from root

* Set flag to use yarn explicitly

* Oops

* Try a different way

* Package.json not yarn.lock

* Maybe??

* Install yarn with npm then run yarn install??

* Add a Node version

* Try one more thing...

* Syntax error

* I think it's working...

* nvm it didn't work

* Use any 14.14 node version -- syntax correct maybe?

* Fix broken redirects smh

* Update redirects for storybook

* Remove unnecessary redirect rule

* Trigger notifications

* Trigger notifications

* Remove some unused comments
This commit is contained in:
Andy Zhao 2021-02-26 10:30:56 -05:00 committed by GitHub
parent e0d695e179
commit 1fd0ec4041
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 23 additions and 21 deletions

View file

@ -1,12 +1,21 @@
# Global settings applied to the whole site.
#
# “publish” is the directory to publish (relative to root of your repo),
# “command” is your build command,
# “base” is directory to change to before starting build. if you set base:
# that is where we will look for package.json/.nvmrc/etc not repo root!
[build]
# base set in Netlify settings UI
command = "npm install && npm run build-storybook"
# environment variables NODE_VERSION and YARN_VERSION set in Netlify settings UI
base = "app/javascript"
command = "npm install yarn && yarn install && yarn run build-storybook"
publish = "storybook-static"
ignore = "git diff --quiet HEAD^ HEAD app/javascript && git diff --quiet HEAD^ HEAD app/assets/stylesheets/config"
ignore = "git diff --quiet HEAD^ HEAD ./ && git diff --quiet HEAD^ HEAD ../assets/stylesheets/config/"
[build.environment]
NODE_VERSION = "14.14"
# See <https://docs.netlify.com/routing/redirects/redirect-options/> for more options
[[redirects]]
from = "http://storybook.dev.to"
to = "https://storybook.forem.com"
status = 301
force = true
[[redirects]]
from = "http://storybook.dev.to/*"
to = "https://storybook.forem.com/:splat"
status = 301
force = true

View file

@ -1,10 +1,3 @@
# Global settings applied to the whole site.
#
# “publish” is the directory to publish (relative to root of your repo),
# “command” is your build command,
# “base” is directory to change to before starting build. if you set base:
# that is where we will look for package.json/.nvmrc/etc not repo root!
[build]
command = "make"
[environment]
@ -12,13 +5,13 @@
# See <https://docs.netlify.com/routing/redirects/redirect-options/> for more options
[[redirects]]
from = "http://docs.dev.to"
to = "http://docs.forem.com"
from = "https://docs.dev.to"
to = "https://docs.forem.com"
status = 301
force = true
[[redirects]]
from = "http://docs.dev.to/*"
to = "http://docs.forem.com/:splat"
from = "https://docs.dev.to/*"
to = "https://docs.forem.com/:splat"
status = 301
force = true