Skip to content
This repository has been archived by the owner on Jan 16, 2023. It is now read-only.

Commit

Permalink
fix: automatically use CI mode if CI env variable is present
Browse files Browse the repository at this point in the history
Merge pull request #94 from nperez0111/master
  • Loading branch information
jimmyandrade authored Jun 15, 2021
2 parents 111c9c6 + ba036f4 commit 28b7fa4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,8 @@ npm run deploy-storybook -- --monorepo-index-generator my-custom-generator.js

To deploy Storybook as part of a CI step, pass the `ci` flag to `npm run deploy-storybook`.

If the `CI` environment variable is set then this mode will be assumed, therefore no need to specify the `ci` flag.

Because pushing to GitHub as part of a CI step requires a [personal access token](https://github.com/blog/1509-personal-api-tokens), Storybook uses the `GH_TOKEN` environment variable, by default, to authenticate GitHub pushes.

This environment variable name can be configured via the `host-token-env-variable` flag.
Expand Down
4 changes: 2 additions & 2 deletions src/parse-args.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ module.exports = packageJson => {
PACKAGES_DIRECTORY: argv.packages,
MONOREPO_INDEX_GENERATOR: argv['monorepo-index-generator'],
NPM_SCRIPT: argv.script || 'build-storybook',
CI_DEPLOY: Boolean(argv.ci),
CI_DEPLOY: Boolean(argv.ci) || Boolean(process.env.CI),
DRY_RUN: Boolean(argv.dryRun),
// Git Variables
GIT_REMOTE: argv.remote || 'origin',
Expand All @@ -115,6 +115,6 @@ module.exports = packageJson => {
AWS_PROFILE: argv['aws-profile'] || 'default',
BUCKET_PATH: argv['bucket-path'],
S3_PATH: 's3://' + argv['bucket-path'],
S3_SYNC_OPTIONS: argv['s3-sync-options'],
S3_SYNC_OPTIONS: argv['s3-sync-options']
};
};

0 comments on commit 28b7fa4

Please sign in to comment.