File tree Expand file tree Collapse file tree 5 files changed +44
-5
lines changed Expand file tree Collapse file tree 5 files changed +44
-5
lines changed Original file line number Diff line number Diff line change 11# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
22# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
33
4- name : Build CI
4+ name : Release next/*
55
66on :
77 push :
Original file line number Diff line number Diff line change 11# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
22# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
33
4- name : Build CI
4+ name : PR ( Build + Storybook)
55
66on :
77 pull_request :
@@ -26,13 +26,51 @@ jobs:
2626 - run : node scripts/setVersion.js --next
2727 - run : yarn build
2828 - run : yarn run pack
29+
2930 - name : Upload a Build Artifact - package
3031 uses : actions/upload-artifact@v2
3132 with :
3233 name : npm-packages
3334 path : artifacts/*
35+
3436 - name : Upload a Build Artifact - bundle
3537 uses : actions/upload-artifact@v2
3638 with :
3739 name : bundle
3840 path : packages/mgt/dist/bundle
41+
42+ storybook :
43+ runs-on : ubuntu-latest
44+ needs : build
45+
46+ strategy :
47+ matrix :
48+ node-version : [12.x]
49+
50+ steps :
51+ - uses : actions/checkout@v2
52+ - name : Use Node.js ${{ matrix.node-version }}
53+ uses : actions/setup-node@v1
54+ with :
55+ node-version : ${{ matrix.node-version }}
56+ registry-url : ' https://registry.npmjs.org'
57+
58+ - name : Build 🛠
59+ run : |
60+ npm install -g yarn lerna
61+ yarn
62+ yarn build
63+ yarn storybook:build
64+
65+ - name : Deploy mgt.dev/next/pr/${{ github.event.number }} 🚀
66+ 67+ with :
68+ branch : gh-pages
69+ folder : storybook-static
70+ target-folder : next/pr/${{ github.event.number }}
71+
72+ - name : Comment PR
73+ uses : thollander/actions-comment-pull-request@v1
74+ with :
75+ message : ' The updated storybook is available [here](https://mgt.dev/next/pr/${{ github.event.number }})'
76+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change 11# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
22# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
33
4- name : Build CI
4+ name : Release latest
55
66on :
77 push :
Original file line number Diff line number Diff line change 11# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
22# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
33
4- name : Build CI
4+ name : Release main
55
66on :
77 push :
Original file line number Diff line number Diff line change 11# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
22# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
33
4- name : Build CI
4+ name : Deploy main storybook
55
66on :
77 push :
3737 branch : gh-pages
3838 folder : storybook-static
3939 target-folder : next
40+ clean-exclude : next/pr
You can’t perform that action at this time.
0 commit comments