Skip to content

Commit

Permalink
try to fix caching issues
Browse files Browse the repository at this point in the history
  • Loading branch information
iz-podpolja committed May 27, 2022
1 parent 876839e commit 75edede
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions .semaphore/npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
16 changes: 8 additions & 8 deletions .semaphore/semaphore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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 '
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions .semaphore/storybook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
2 changes: 1 addition & 1 deletion .storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 75edede

Please sign in to comment.