Skip to content

Commit fad3d58

Browse files
committed
[migrate] replace Travis CI with GitHub actions
[optimize] add Yarn lock for CI cache [optimize] several details [optimize] upgrade Upstream packages
1 parent 3724479 commit fad3d58

File tree

27 files changed

+8830
-190
lines changed

27 files changed

+8830
-190
lines changed

.github/workflows/main.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: CI & CD
2+
on:
3+
push:
4+
branches:
5+
- master
6+
jobs:
7+
Build-and-Deploy:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout
11+
uses: actions/checkout@v2
12+
- name: Use Node.js
13+
uses: actions/setup-node@v2
14+
with:
15+
node-version: 14
16+
cache: yarn
17+
- name: Install & build
18+
run: yarn && yarn build
19+
- name: Deploy
20+
uses: peaceiris/actions-gh-pages@v3
21+
with:
22+
publish_dir: ./dist
23+
cname: bootstrap.web-cell.dev
24+
personal_token: ${{ secrets.GITHUB_TOKEN }}
25+
force_orphan: true

.husky/pre-commit

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/sh
2+
3+
. "$(dirname "$0")/_/husky.sh"
4+
5+
npm test

.husky/pre-push

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/sh
2+
3+
. "$(dirname "$0")/_/husky.sh"
4+
5+
npm run build

.travis.yml

Lines changed: 0 additions & 23 deletions
This file was deleted.

ReadMe.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ Re-implemented Official **Document site** of [BootStrap][1] & [FontAwesome][2]
44
based on [WebCell][3], [BootCell][4] & [MarkCell][5]
55

66
[![NPM Dependency](https://david-dm.org/EasyWebApp/BootCell-document.svg)][6]
7-
[![Build Status](https://travis-ci.com/EasyWebApp/BootCell-document.svg?branch=master)][7]
7+
[![CI & CD](https://github.com/EasyWebApp/BootCell-document/workflows/CI%20&%20CD/badge.svg)][7]
88

99
[1]: https://getbootstrap.com/
1010
[2]: https://fontawesome.com/
1111
[3]: https://web-cell.dev/
1212
[4]: https://web-cell.dev/BootCell/
1313
[5]: https://github.com/EasyWebApp/MarkCell
1414
[6]: https://david-dm.org/EasyWebApp/BootCell-document
15-
[7]: https://travis-ci.com/EasyWebApp/BootCell-document
15+
[7]: https://github.com/EasyWebApp/BootCell-document/actions

document/source/components/Calendar/WeekCalender.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ You can render Custom contents with `renderCell(start: Date)` function.
5050

5151
<Example>
5252
<WeekCalendar
53-
renderCell={start => 'Class starts at ' + formatDate(start, 'HH:mm')}
53+
renderCell={start => `Class starts at ${formatDate(start, 'HH:mm')}`}
5454
/>
5555
</Example>
5656

@@ -61,7 +61,7 @@ import { WeekCalendar } from 'boot-cell/source/Calendar/WeekCalendar';
6161

6262
render(
6363
<WeekCalendar
64-
renderCell={start => 'Class starts at ' + formatDate(start, 'HH:mm')}
64+
renderCell={start => `Class starts at ${formatDate(start, 'HH:mm')}`}
6565
/>
6666
);
6767
```

document/source/components/Form/InputGroup.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Place one add-on or button on either side of an input. You may also place one on
3030
/>
3131
@example.com
3232
</InputGroup>
33-
<label for="basic-url">Your vanity URL</label>
33+
<label htmlFor="basic-url">Your vanity URL</label>
3434
<InputGroup>
3535
https://example.com/users/
3636
<Field id="basic-url" placeholder="Username" aria-label="Username" />
@@ -64,7 +64,7 @@ render(
6464
/>
6565
@example.com
6666
</InputGroup>
67-
<label for="basic-url">Your vanity URL</label>
67+
<label htmlFor="basic-url">Your vanity URL</label>
6868
<InputGroup>
6969
https://example.com/users/
7070
<Field id="basic-url" placeholder="Username" aria-label="Username" />

document/source/components/Prompt/Dialog.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ import { Example } from '../../../../source/component/Example';
2525
```HTML
2626
<link
2727
rel="stylesheet"
28-
href="https://cdn.jsdelivr.net/npm/[email protected].4/dist/dialog-polyfill.css"
28+
href="https://cdn.jsdelivr.net/npm/[email protected].6/dist/dialog-polyfill.css"
2929
/>
30-
<script src="https://cdn.jsdelivr.net/npm/[email protected].4/dist/dialog-polyfill.js"></script>
30+
<script src="https://cdn.jsdelivr.net/npm/[email protected].6/dist/dialog-polyfill.js"></script>
3131
```
3232

3333
Keep reading for demos and usage guidelines.
@@ -432,7 +432,7 @@ Our default modal without `size` parameter constitutes the "medium" size modal.
432432
color="primary"
433433
onClick={() =>
434434
openDialog(
435-
<Modal title={level + ' modal'} size={size}>
435+
<Modal title={`${level} modal`} size={size}>
436436
Hello, BootCell!
437437
</Modal>
438438
)
@@ -457,7 +457,7 @@ render([
457457
color="primary"
458458
onClick={() =>
459459
openDialog(
460-
<Modal title={level + ' modal'} size={size}>
460+
<Modal title={`${level} modal`} size={size}>
461461
Hello, BootCell!
462462
</Modal>
463463
)

document/source/components/Reminder/Badge.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Badges scale to match the size of the immediate parent element by using relative
1616

1717
<Example>
1818
{[1, 2, 3, 4, 5, 6].map(level => {
19-
const Tag = 'h' + level;
19+
const Tag = `h${level}`;
2020
return (
2121
<Tag>
2222
Example heading <Badge color="secondary">New</Badge>
@@ -30,7 +30,7 @@ import { render, createCell } from 'web-cell';
3030
import { Badge } from 'boot-cell/source/Reminder/Badge';
3131

3232
render([1, 2, 3, 4, 5, 6].map(level => {
33-
const Tag = 'h' + level;
33+
const Tag = `h${level}`;
3434

3535
return (
3636
<Tag>

document/source/components/Reminder/FAIcon.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ For clarity in the following example, we’ve added a background color on the ic
134134
<FAIcon
135135
name={name}
136136
fixedWidth
137-
className={'bg-' + (index % 2 ? 'info' : 'primary')}
137+
className={`bg-${index % 2 ? 'info' : 'primary'}`}
138138
/>{' '}
139139
{title}
140140
</li>
@@ -159,7 +159,7 @@ render(
159159
<FAIcon
160160
name={name}
161161
fixedWidth
162-
className={'bg-' + (index % 2 ? 'info' : 'primary')}
162+
className={`bg-${index % 2 ? 'info' : 'primary'}`}
163163
/>{' '}
164164
{title}
165165
</li>

0 commit comments

Comments
 (0)