diff --git a/.github/workflows/sync-rebase.yml b/.github/workflows/sync-rebase.yml new file mode 100644 index 000000000000..b7f986cd5f0d --- /dev/null +++ b/.github/workflows/sync-rebase.yml @@ -0,0 +1,38 @@ +name: Sync and Rebase + +on: + push: + branches: + - creevey + schedule: + - cron: '0 0 * * *' # every day + workflow_dispatch: # on button click + +jobs: + sync: + + runs-on: ubuntu-latest + + steps: + - name: Setup git username + run: | + git config --global user.email "actions@github.com" + git config --global user.name "Github Actions" + - uses: actions/checkout@v2 + with: + ref: creevey + fetch-depth: 0 + - name: Sync with upstream + run: | + git remote add upstream https://github.com/storybookjs/storybook.git + git fetch upstream + - name: Rebase creevey branch + run: | + git reset upstream/master --hard + git cherry-pick master..HEAD + git push origin --force + - name: Rebase master branch + run: | + git checkout master + git reset upstream/master --hard + git push origin --force diff --git a/examples/official-storybook/creevey.config.js b/examples/official-storybook/creevey.config.js new file mode 100644 index 000000000000..273e4dca1462 --- /dev/null +++ b/examples/official-storybook/creevey.config.js @@ -0,0 +1,9 @@ +// eslint-disable-next-line no-underscore-dangle +process.env.__CREEVEY_STORYBOOK_FRAMEWORK__ = 'react'; +// eslint-disable-next-line no-underscore-dangle +process.env.__CREEVEY_STORYBOOK_VERSION__ = require('./package.json').version; + +/** @type {import("creevey").CreeveyConfig } */ +module.exports = { + storybookDir: process.cwd(), +}; diff --git a/examples/official-storybook/main.ts b/examples/official-storybook/main.ts index e72009a04f20..9dacf6bdf2dd 100644 --- a/examples/official-storybook/main.ts +++ b/examples/official-storybook/main.ts @@ -1,4 +1,4 @@ -/// +// / import type { StorybookConfig } from '@storybook/react/types'; @@ -8,7 +8,7 @@ module.exports = { '../../lib/ui/src/**/*.stories.@(js|tsx|mdx)', '../../lib/components/src/**/*.stories.@(js|tsx|mdx)', './stories/**/*stories.@(js|ts|tsx|mdx)', - './../../addons/docs/**/*.stories.tsx', + // TODO Support storiesOf variables './../../addons/docs/**/*.stories.tsx', ], reactOptions: { fastRefresh: true, @@ -30,6 +30,7 @@ module.exports = { '@storybook/addon-jest', '@storybook/addon-graphql', '@storybook/addon-queryparams', + 'creevey', ], core: { builder: 'webpack4',