Skip to content

Commit

Permalink
fix: update @gio-design/tokens and @gio-design/icon build command
Browse files Browse the repository at this point in the history
affects: @gio-design/react-svg-icon-generator, @gio-design/tokens

Remove package-lock.json for react-svg-icon-generator.
Add cache for lerna in github action.
Set ssr for website.
Update CI workflow.
  • Loading branch information
jack0pan committed Jun 9, 2020
1 parent 3e94c77 commit 1507049
Show file tree
Hide file tree
Showing 8 changed files with 170 additions and 6,806 deletions.
32 changes: 19 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,33 @@ jobs:
build:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- name: Checkout
uses: actions/checkout@v2

- name: Restore lerna
uses: actions/cache@v2
with:
path: |
node_modules
*/*/node_modules
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}

- name: Install
uses: borales/actions-yarn@v2.0.0
with:
cmd: install
- name: Build packages

- name: Lint
uses: borales/actions-yarn@v2.0.0
with:
cmd: build
- name: Build website
cmd: lint

- name: Test
uses: borales/actions-yarn@v2.0.0
with:
cmd: build:website
cmd: test

- name: Deploy to Netlify
uses: nwtgck/actions-netlify@v1.1
- name: Build packages
uses: borales/actions-yarn@v2.0.0
with:
publish-dir: './packages/website/dist'
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
cmd: build
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
"**/@gio-design/tokens/**",
"**/@gio-design/themes",
"**/@gio-design/themes/**",
"**/@gio-design/react-svg-icon-generator/**",
"website/"
"**/@gio-design/react-svg-icon-generator/**"
]
},
"license": "MIT",
Expand Down Expand Up @@ -49,8 +48,10 @@
"build:components": "yarn workspace @gio-design/components build",
"build:icon-generator": "yarn workspace @gio-design/react-svg-icon-generator build",
"publish": "npx lerna publish",
"lint": "yarn lint:components",
"lint:components": "eslint packages/components/src --ext .js,.jsx,.ts,.tsx",
"cm": "git-cz"
"cm": "git-cz",
"test": "yarn test:components"
},
"config": {
"commitizen": {
Expand Down
2 changes: 1 addition & 1 deletion packages/icon/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
],
"scripts": {
"build": "yarn svg-icon && rollup -c && yarn gen-list",
"svg-icon": "yarn svg-icon-generate --svgDir assets --destination dist/Icon.js --keepFillColor true --radium false",
"svg-icon": "if [ ! -d dist ]; then mkdir dist; fi && yarn svg-icon-generate --svgDir assets --destination dist/Icon.js --keepFillColor true --radium false",
"test": "echo \"Error: run tests from root\" && exit 1",
"gen-list": "node scripts/gen-list.js"
},
Expand Down
Loading

0 comments on commit 1507049

Please sign in to comment.