Skip to content

Commit

Permalink
chore: 增加github action
Browse files Browse the repository at this point in the history
  • Loading branch information
JerryFan626 committed Dec 3, 2024
1 parent 73b68fc commit 567c055
Show file tree
Hide file tree
Showing 4 changed files with 128 additions and 52 deletions.
Binary file modified .DS_Store
Binary file not shown.
46 changes: 46 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Deploy to Server

on:
push:
branches: [ main ]

jobs:
deploy:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'

- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 8

- name: Install Dependencies
run: pnpm install

- name: Build
run: pnpm build

- name: Create deployment package
run: tar -czf deploy.tar.gz .next public

- name: Setup SSH
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}

- name: Add host key
run: |
mkdir -p ~/.ssh
ssh-keyscan -H ${{ secrets.SERVER_IP }} >> ~/.ssh/known_hosts
- name: Deploy to server
run: |
scp deploy.tar.gz package.json package-lock.json root@${{ secrets.SERVER_IP }}:/root/fastexcel-doc
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"
10 changes: 6 additions & 4 deletions pages/en-US/docs/advance_api.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ Number conversion, using `String` to receive Excel number format data will trigg
| xlsxSAXParserFactoryName | Empty | Specifies the name of the class used for sax reading, for example: `com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl`. |
| 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`. |
| extraReadSet | Empty | Set of additional content to be read, not read by default. |
| 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.
| 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.

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

`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:

| Method | Description |
|----------------------------------------|----------------------------------------------------------------------------------------------|
| `void invoke(T data, AnalysisContext context)` | Triggered when
| Method | Description |
|--------|-------------|
| `void invoke(T data, AnalysisContext context)` | Triggered when reading each row of data |


Loading

0 comments on commit 567c055

Please sign in to comment.