Skip to content

Commit 567c055

Browse files
committed
chore: 增加github action
1 parent 73b68fc commit 567c055

File tree

4 files changed

+128
-52
lines changed

4 files changed

+128
-52
lines changed

.DS_Store

0 Bytes
Binary file not shown.

.github/workflows/build.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Deploy to Server
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
7+
jobs:
8+
deploy:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- uses: actions/checkout@v4
13+
14+
- name: Setup Node.js
15+
uses: actions/setup-node@v4
16+
with:
17+
node-version: '18'
18+
19+
- name: Setup pnpm
20+
uses: pnpm/action-setup@v2
21+
with:
22+
version: 8
23+
24+
- name: Install Dependencies
25+
run: pnpm install
26+
27+
- name: Build
28+
run: pnpm build
29+
30+
- name: Create deployment package
31+
run: tar -czf deploy.tar.gz .next public
32+
33+
- name: Setup SSH
34+
uses: webfactory/[email protected]
35+
with:
36+
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
37+
38+
- name: Add host key
39+
run: |
40+
mkdir -p ~/.ssh
41+
ssh-keyscan -H ${{ secrets.SERVER_IP }} >> ~/.ssh/known_hosts
42+
43+
- name: Deploy to server
44+
run: |
45+
scp deploy.tar.gz package.json package-lock.json root@${{ secrets.SERVER_IP }}:/root/fastexcel-doc
46+
ssh root@${{ secrets.SERVER_IP }} "cd /root/fastexcel-doc && rm -rf .next && tar -xzvf deploy.tar.gz --warning=no-unknown-keyword && pm2 restart fastexcel-doc"

pages/en-US/docs/advance_api.mdx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ Number conversion, using `String` to receive Excel number format data will trigg
7676
| xlsxSAXParserFactoryName | Empty | Specifies the name of the class used for sax reading, for example: `com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl`. |
7777
| useDefaultListener | true | `@since 2.1.4` <br/>By default, `ModelBuildEventListener` is added to help convert to the object passed in. If set to `false`, it will not assist in converting objects, and custom listeners will receive a `Map<Integer, CellData>` object. If you still want to receive `class` objects, call the `readListener` method and add custom `beforeListener`, `ModelBuildEventListener`, and custom `afterListener`. |
7878
| extraReadSet | Empty | Set of additional content to be read, not read by default. |
79-
| readDefaultReturn | STRING | `@since 3.2.0`<br/>STRING: Returns an array of Map<Integer, String>, the return value is the content you see in the excel cell without clicking on it.<br/>ACTUAL_DATA: Returns an array of Map<Integer, Object>, the actual stored data, will automatically convert types, Object type can be `BigDecimal`, `Boolean`, `String`, `LocalDateTime`, null.<br/>READ_CELL_DATA: Returns an array of Map<Integer, ReadCellData<?>>, where `?` type refers to ACTUAL_DATA.
79+
| readDefaultReturn | STRING | `@since 3.2.0`<br/>STRING: Returns an array of Map&lt;Integer,Object&gt;, the return value is the content you see in the excel cell without clicking on it.<br/>ACTUAL_DATA: Returns an array of Map&lt;Integer,Object&gt;, the actual stored data, will automatically convert types, Object type can be `BigDecimal`, `Boolean`, `String`, `LocalDateTime`, null.<br/>READ_CELL_DATA: Returns an array of Map&lt;Integer,ReadCellData&lt;?&gt;&gt;, where `?` type refers to ACTUAL_DATA.
8080

8181
## ReadSheet (just a Sheet in excel) parameters
8282
| Name | Default Value | Description |
@@ -301,6 +301,8 @@ public void dropdownWrite() {
301301

302302
`ReadListener` is a generic interface, with the generic type being the type of object to be read (e.g., `DemoData`). Its core methods are as follows:
303303

304-
| Method | Description |
305-
|----------------------------------------|----------------------------------------------------------------------------------------------|
306-
| `void invoke(T data, AnalysisContext context)` | Triggered when
304+
| Method | Description |
305+
|--------|-------------|
306+
| `void invoke(T data, AnalysisContext context)` | Triggered when reading each row of data |
307+
308+

0 commit comments

Comments
 (0)