From 6477958a9131df758fbb7a4467ee79a9192c935b Mon Sep 17 00:00:00 2001 From: "Azat S." Date: Thu, 31 Oct 2024 17:54:08 +0300 Subject: [PATCH] docs: add example report --- .cspell.json | 2 +- .github/workflows/docs.yml | 40 +++ package.json | 1 + preview/index.html | 1 - preview/mock/api.mock.ts | 647 +------------------------------------ preview/mock/data.ts | 645 ++++++++++++++++++++++++++++++++++++ preview/typings/index.d.ts | 2 +- readme.md | 2 + vite.config.ts | 55 +++- 9 files changed, 741 insertions(+), 654 deletions(-) create mode 100644 .github/workflows/docs.yml create mode 100644 preview/mock/data.ts diff --git a/.cspell.json b/.cspell.json index d359f97..088d217 100644 --- a/.cspell.json +++ b/.cspell.json @@ -9,7 +9,7 @@ "license", "pnpm-lock.yaml", "preview/elements/avatar.svelte", - "preview/mock/api.mock.ts", + "preview/mock/data.ts", "tsconfig.json" ], "words": [ diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 0000000..9569016 --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,40 @@ +name: Docs + +on: + push: + branches: + - 'main' + +jobs: + deploy: + name: Deploy + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Install Tools + uses: ./.github/actions/install-tools + + - name: Install Dependencies + uses: ./.github/actions/install-dependencies + + - name: Build Docs + run: pnpm run docs:build + + - name: Deploy to Netlify + uses: nwtgck/actions-netlify@v3 + with: + publish-dir: './dist' + production-branch: main + deploy-message: 'deploy from github actions' + enable-pull-request-comment: false + enable-commit-comment: true + overwrites-pull-request-comment: true + env: + NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} + NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} + timeout-minutes: 1 diff --git a/package.json b/package.json index 2171093..192fcb4 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,7 @@ "build": "pnpm run /^build:/", "build:lib": "cargo build --release && node ./scripts/build.js", "build:preview": "vite build", + "build:docs": "DOCS=true vite build", "release": "pnpm release:check && pnpm release:version", "release:check": "pnpm test && pnpm run build", "release:version": "changelogen --output changelog.md --release --push", diff --git a/preview/index.html b/preview/index.html index 4716321..4a0089b 100644 --- a/preview/index.html +++ b/preview/index.html @@ -8,7 +8,6 @@ -