Skip to content

Commit

Permalink
Style(ci): Use multiline strings for Netlify config commands
Browse files Browse the repository at this point in the history
  • Loading branch information
literat committed Oct 24, 2023
1 parent c99bdbe commit 4768e24
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
12 changes: 10 additions & 2 deletions netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,19 @@
publish = ".storybook/build"

# Default build command.
command = "yarn lerna run --scope @lmc-eu/spirit-icons build --skip-nx-cache && yarn storybook:build"
command = """\
yarn lerna run --scope @lmc-eu/spirit-icons build --skip-nx-cache \
&& yarn storybook:build \
"""

# Ignore builds on Netlify
ignore = "node ./scripts/ignoreNetlifyBuilds.js"

[context.deploy-preview]
# Deploy preview only if there are changes in some directories
ignore = "git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF ./packages/web-react/src/ .storybook/ ./packages/web-react/docs/stories/"
ignore = """\
git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF \
./packages/web-react/src/ \
.storybook/ \
./packages/web-react/docs/stories/ \
"""
6 changes: 5 additions & 1 deletion packages/web-react/netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@
publish = "build"

# Default build command.
command = "cd ../../ && yarn lerna run --scope @lmc-eu/spirit-icons build --skip-nx-cache && yarn lerna run --scope @lmc-eu/spirit-web-react examples:build --skip-nx-cache"
command = """\
cd ../../ \
&& yarn lerna run --scope @lmc-eu/spirit-icons build --skip-nx-cache \
&& yarn lerna run --scope @lmc-eu/spirit-web-react examples:build --skip-nx-cache \
"""

# Ignore builds on Netlify
ignore = "node ../../scripts/ignoreNetlifyBuilds.js"
Expand Down

0 comments on commit 4768e24

Please sign in to comment.