diff --git a/.semaphore/npm.yml b/.semaphore/npm.yml index 3a8db8dd..034d9eb8 100644 --- a/.semaphore/npm.yml +++ b/.semaphore/npm.yml @@ -13,7 +13,7 @@ blocks: - name: Deploy to NPM commands: - cache restore - - cache restore npm-package - - cache restore package + - cache restore npm-package-$SEMAPHORE_GIT_BRANCH + - cache restore package-$SEMAPHORE_GIT_BRANCH - npm set-script prepare "" - HUSKY=0 npm publish diff --git a/.semaphore/semaphore.yml b/.semaphore/semaphore.yml index 9859a86c..c611152e 100644 --- a/.semaphore/semaphore.yml +++ b/.semaphore/semaphore.yml @@ -20,7 +20,7 @@ blocks: - yarn - cache store - yarn build-tokens - - cache store tokens build + - cache store tokens-$SEMAPHORE_GIT_BRANCH build prologue: commands: - checkout @@ -37,7 +37,7 @@ blocks: commands: - "sem-version node $(awk '/^nodejs/ { print $2 }' .tool-versions)" - cache restore - - cache restore tokens + - cache restore tokens-$SEMAPHORE_GIT_BRANCH - yarn - yarn test - name: Lint @@ -52,7 +52,7 @@ blocks: commands: - "sem-version node $(awk '/^nodejs/ { print $2 }' .tool-versions)" - cache restore - - cache restore tokens + - cache restore tokens-$SEMAPHORE_GIT_BRANCH - yarn - yarn lint - name: 'Build ' @@ -70,19 +70,19 @@ blocks: commands: - "sem-version node $(awk '/^nodejs/ { print $2 }' .tool-versions)" - cache restore - - cache restore tokens + - cache restore tokens-$SEMAPHORE_GIT_BRANCH - yarn - yarn build - - cache store npm-package dist - - cache store package package.json + - cache store npm-package-$SEMAPHORE_GIT_BRANCH dist + - cache store package-$SEMAPHORE_GIT_BRANCH package.json - name: Build Storybook commands: - "sem-version node $(awk '/^nodejs/ { print $2 }' .tool-versions)" - cache restore - - cache restore tokens + - cache restore tokens-$SEMAPHORE_GIT_BRANCH - yarn - yarn build-storybook - - cache store storybook storybook-static + - cache store storybook-$SEMAPHORE_GIT_BRANCH storybook-static promotions: - name: Deploy to NPM pipeline_file: npm.yml diff --git a/.semaphore/storybook.yml b/.semaphore/storybook.yml index 27172308..6c4f693e 100644 --- a/.semaphore/storybook.yml +++ b/.semaphore/storybook.yml @@ -20,5 +20,5 @@ blocks: - ssh-add ~/.ssh/id_rsa_semaphore - cache restore - npm i gh-pages -g - - cache restore storybook - - gh-pages --dist storybook-static --dotfiles --message "[skip ci] Updates" + - cache restore storybook-$SEMAPHORE_GIT_BRANCH + - gh-pages --dist storybook-static --no-history --dotfiles --message "[skip ci] Updates" diff --git a/.storybook/main.js b/.storybook/main.js index de14b9d4..ec53be22 100644 --- a/.storybook/main.js +++ b/.storybook/main.js @@ -13,7 +13,7 @@ module.exports = { builder: '@storybook/builder-vite', }, async viteFinal(config, { configType }) { - console.log('baseurl', process.env.BASE_URL) + console.log('env', process.env.BASE_URL, process.env.STORYBOOK_FIGMA_ACCESS_TOKEN) config.base = process.env.BASE_URL || config.base // return the customized config diff --git a/package.json b/package.json index 6bc2b630..993afcc1 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,7 @@ "figma::components": "ts-node -r dotenv/config --project ./tsconfig.tsnode.json figma/fetch_components.ts PJ7OUutWRrSHW6qgaPNW1l", "component::add::main": "ts-node --project ./tsconfig.tsnode.json node_modules/.bin/yo ./generator --figma --test --story --root src/lib", "component::add::local": "ts-node --project ./tsconfig.tsnode.json node_modules/.bin/yo ./generator --root", - "build-storybook": "export BASE_URL='/betterplace-design-system/'; build-storybook", + "build-storybook": "build-storybook", "build-tokens": "style-dictionary build --config config/sd.config.js", "lint": "tsc -p tsconfig.base.json && eslint . && stylelint src/**/*.css", "prepare": "husky install"