Skip to content

Commit d23da4d

Browse files
authored
Merge pull request #750 from streamich/gh-pages-1
Add GitHub pages script
2 parents 58d6c8e + df3ee55 commit d23da4d

File tree

5 files changed

+833
-551
lines changed

5 files changed

+833
-551
lines changed

.circleci/config.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@ jobs:
5050
- run:
5151
name: Release
5252
command: yarn release
53+
- run:
54+
name: Deploy static site
55+
command: yarn storybook:build && yarn storybook:deploy
5356
- *Post_to_dev_null
5457

5558
# nightly:

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@
2828
"build": "yarn build:cjs && yarn build:es",
2929
"storybook": "start-storybook -p 6010",
3030
"storybook:build": "build-storybook",
31-
"storybook:clean": "rimraf storybook-static"
31+
"storybook:clean": "rimraf storybook-static",
32+
"storybook:deploy": "gh-pages -d storybook-static"
3233
},
3334
"keywords": [],
3435
"peerDependencies": {
@@ -47,6 +48,7 @@
4748
"@types/react-dom": "17.0.11",
4849
"babel-loader": "8.2.3",
4950
"fork-ts-checker-webpack-plugin": "6.5.0",
51+
"gh-pages": "^3.2.3",
5052
"git-cz": "4.8.0",
5153
"husky": "6.0.0",
5254
"prettier": "2.5.1",

src/__story__/pdf.story.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import {storiesOf} from '@storybook/react';
33
import Embed from '..';
44
import {Box} from './Box';
55

6-
const pdf = 'http://www.africau.edu/images/default/sample.pdf';
6+
const pdf = 'https://www.africau.edu/images/default/sample.pdf';
77

88
storiesOf('PDF', module)
99
.add('A pdf file', () => {

src/blocks/pdf/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as React from 'react';
22
import {BlockProps} from '../..';
33

4-
const Pdf: React.FC<BlockProps> = ({url, isDark, width, renderWrap}) => {
4+
const Pdf: React.FC<BlockProps> = ({url, renderWrap}) => {
55
return renderWrap(
66
<embed src={url} type="application/pdf" style={{width: '100%', minHeight: 600}} className="react-embed--pdf" />
77
);

0 commit comments

Comments
 (0)