Skip to content

Commit 678feb3

Browse files
committed
removed db auto create, added compressed connection, fix docbuilder delete before create table
1 parent 060c0c8 commit 678feb3

4 files changed

Lines changed: 4 additions & 5 deletions

File tree

.github/workflows/test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ jobs:
2020
strip-md-titles: true
2121
strip-jsx: true
2222
strip-html: true
23-
path: docs
23+
path: docs/commands

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ jobs:
4242
3. Make sure you have a project on SQLite Cloud. If not, sign up for an account and create one.
4343
4. Add the Project Connection String as a secret in your repository settings, named `PROJECT_STRING`.
4444
5. Customize these inputs according to your needs.
45-
* if the `database` input doesn't exist on the SQLite Cloud project the workflow will create it automatically.
4645
* if the `path` input isn't specified the workflow will search for every .md or .mdx file recursively from the root folder.
4746
* `strip-html`: Set this input to `true` if you want to remove the html elements.
4847
* `strip-jsx`: Set this input to `true` if you want to remove the jsx elements.

action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ runs:
5151

5252
- name: Runs .sql builder
5353
run: |
54-
args="--add-create-database --use-transactions --json"
54+
args=" --use-transactions --json"
5555
[[ ${{ inputs.strip-html }} == true ]] && args+=" --strip-html"
5656
[[ ${{ inputs.strip-jsx }} == true ]] && args+=" --strip-jsx"
5757
[[ ${{ inputs.strip-md-titles }} == true ]] && args+=" --strip-md-titles"
@@ -68,7 +68,7 @@ runs:
6868
echo -e "\", \"database\": \"${{ inputs.database }}\"}" >> up.json
6969
cat up.json
7070
URL="https:"$(echo ${{ inputs.project-string }} | awk -F ':' '{print $2}')":8090/v2/weblite/sql"
71-
RES=$(curl $URL -H 'Content-Type: application/json' -H 'Authorization: Bearer ${{ inputs.project-string }}' -H 'accept: application/json' -d @up.json)
71+
RES=$(curl --compressed $URL -H 'Content-Type: application/json' -H 'Authorization: Bearer ${{ inputs.project-string }}' -H 'accept: application/json' -d @up.json)
7272
echo $RES
7373
if [[ "$RES" =~ error ]]; then
7474
echo "Error on SQLite Cloud .sql execution"

src/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,8 +368,8 @@ static void create_file (const char *path) {
368368
write_line("BEGIN TRANSACTION;", -1, 1);
369369
}
370370

371-
write_line("DELETE FROM documentation;", -1, 1);
372371
write_line("CREATE VIRTUAL TABLE IF NOT EXISTS documentation USING fts5 (url, content);", -1, 1);
372+
write_line("DELETE FROM documentation;", -1, 1);
373373
}
374374

375375
static void create_output (const char *path) {

0 commit comments

Comments
 (0)