Skip to content

Commit

Permalink
Adds actions
Browse files Browse the repository at this point in the history
  • Loading branch information
paschalidi committed Jan 16, 2020
1 parent ab418c8 commit 4354de9
Show file tree
Hide file tree
Showing 9 changed files with 1,674 additions and 5,070 deletions.
41 changes: 17 additions & 24 deletions .github/workflows/npmpublish.yml
Original file line number Diff line number Diff line change
@@ -1,45 +1,38 @@
name: Node.js Package
name: storybook workflow

on:
release:
types: [created]

jobs:
build:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: 12
- run: npm ci
- run: npm test
- run: yarn
- run: yarn linter:check
- run: yarn test

publish-npm:
needs: build
deploy-surge:
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: 12
registry-url: https://registry.npmjs.org/
- run: npm ci
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
- run: yarn
- run: yarn build:static
- run: yarn surge --project storybook-static --domain the-simple-web-compoments.surge.sh --token ${{ secrets.surge_token }}

publish-gpr:
needs: build
publish-npm:
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: 12
registry-url: https://npm.pkg.github.com/
scope: '@the-simple'
- run: npm ci
- run: npm publish
- run: yarn
- run: yarn build:dist
- run: echo "//registry.npmjs.org/:_authToken=$NODE_AUTH_TOKEN" >> ~/.npmrc
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
NODE_AUTH_TOKEN: ${{ secrets.npm_token }}
- run: yarn publish --new-version ${GITHUB_REF#"refs/tags/"} --no-git-tag-version
18 changes: 8 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "@okra-cms/web-components",
"version": "1.0.0",
"private": true,
"name": "@the-simple/web-components",
"version": "0.0.0",
"license": "MIT",
"files": [
"/dist",
Expand All @@ -13,12 +12,11 @@
"scripts": {
"linter:fix": "prettier --write '{,!(node_modules|.git|storybook-static)/**/}*.{js,json,jsx,md}'",
"linter:check": "eslint src/**/* && eslint stories/*.jsx",
"start": "npm -s run build:package && start-storybook -p 3006 -s ./public",
"build:storybook": "storybook-to-ghpages",
"start": "npm -s run build:dist && start-storybook -p 3006 -s ./public",
"build:static": "build-storybook -s public",
"build:package": "babel --presets @babel/react ./src --out-dir ./dist",
"test": "npm run build:package && jest",
"test:dist": "npm run build:package && node tests/dist.test.js",
"build:dist": "babel --presets @babel/react ./src --out-dir ./dist",
"test": "npm run build:dist && jest",
"test:dist": "npm run build:dist && node tests/dist.test.js",
"test:watch": "npm run test -- --watchAll"
},
"dependencies": {
Expand All @@ -41,7 +39,6 @@
"@storybook/addon-storyshots": "^5.2.0",
"@storybook/addons": "^5.2.1",
"@storybook/react": "^5.2.1",
"@storybook/storybook-deployer": "^2.8.1",
"@storybook/theming": "^5.2.1",
"babel-loader": "8.0.6",
"babel-plugin-require-context-hook": "1.0.0",
Expand All @@ -52,7 +49,8 @@
"jest-styled-components": "6.3.3",
"prettier": "^1.18.2",
"react-scripts": "^3.1.1",
"react-test-renderer": "16.10.2"
"react-test-renderer": "16.10.2",
"surge": "^0.21.3"
},
"jest": {
"projects": [
Expand Down
8 changes: 2 additions & 6 deletions src/Caption/Caption.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,8 @@ const CaptionStyles = styled.div`
font-weight: 500;
`;

export default function Caption({ children, style, type }) {
return (
<CaptionStyles style={style} type={type}>
{children}
</CaptionStyles>
);
export default function Caption({ children, style }) {
return <CaptionStyles style={style}>{children}</CaptionStyles>;
}

Caption.propTypes = {
Expand Down
5 changes: 0 additions & 5 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,3 @@ export { default as H2 } from "./H2";
export { default as H3 } from "./H3";
export { default as Tiny } from "./Tiny";
export { default as Caption } from "./Caption";
export { default as FeedbackTable } from "./FeedbackTable";
export { default as Multistep } from "./Multistep";
export { default as RadioGroup } from "./Multistep/RadioGroup";
export { default as Textarea } from "./Multistep/Textarea";
export { default as Scale } from "./Multistep/Scale";
3 changes: 0 additions & 3 deletions stories/Caption.story.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,4 @@ storiesOf("Caption", module)
<Caption style={{ color: Colors.primary }}>
Components are here to stay
</Caption>
))
.add("type bold", () => (
<Caption type="bold">Components are here to stay</Caption>
));
92 changes: 0 additions & 92 deletions stories/FeedbackTable.story.jsx

This file was deleted.

87 changes: 0 additions & 87 deletions stories/Multistep.story.jsx

This file was deleted.

Loading

0 comments on commit 4354de9

Please sign in to comment.