From 147c32de92c7303a6c449f22f23d75c63a67d568 Mon Sep 17 00:00:00 2001 From: Faisal Amir Date: Tue, 21 Nov 2023 09:37:34 +0700 Subject: [PATCH 1/3] Fix anchor link sidebar openapi --- docs/src/styles/base.scss | 3 --- 1 file changed, 3 deletions(-) diff --git a/docs/src/styles/base.scss b/docs/src/styles/base.scss index 27f85cb28..a59df6f73 100644 --- a/docs/src/styles/base.scss +++ b/docs/src/styles/base.scss @@ -1,7 +1,4 @@ @layer base { - html { - @apply scroll-smooth; - } html[data-theme="light"] { --ifm-background-color: white; --ifm-color-primary: #2563eb; /* New Primary Blue */ From 0dd70824e8cde13ac4ec33e15287a55f54795487 Mon Sep 17 00:00:00 2001 From: hiento09 <136591877+hiento09@users.noreply.github.com> Date: Tue, 21 Nov 2023 10:26:26 +0700 Subject: [PATCH 2/3] Feature: Preview URL for each PR and add pre-release.jan.ai as staging of Jan Docs (#669) * CloudFlare Pages add Preview URL to PR --------- Co-authored-by: Hien To --- .github/workflows/jan-docs.yml | 32 +++++++++++++++++++++--- .github/workflows/jan-electron-build.yml | 2 +- 2 files changed, 30 insertions(+), 4 deletions(-) diff --git a/.github/workflows/jan-docs.yml b/.github/workflows/jan-docs.yml index afb8ac463..2993d1525 100644 --- a/.github/workflows/jan-docs.yml +++ b/.github/workflows/jan-docs.yml @@ -6,6 +6,7 @@ on: - main paths: - 'docs/**' + tags: ["v[0-9]+.[0-9]+.[0-9]+-docs"] pull_request: branches: - main @@ -18,7 +19,14 @@ on: jobs: deploy: name: Deploy to GitHub Pages + env: + CLOUDFLARE_ACCOUNT_ID: 9707100ef42a1a25bd70e3ee2137bd0e + CLOUDFLARE_PROJECT_NAME: jan runs-on: ubuntu-latest + permissions: + contents: read + deployments: write + pull-requests: write steps: - uses: actions/checkout@v3 - uses: actions/setup-node@v3 @@ -50,15 +58,33 @@ jobs: - name: Build website run: sed -i '/process.env.DEBUG = namespaces;/c\// process.env.DEBUG = namespaces;' ./node_modules/debug/src/node.js && yarn build working-directory: docs - + + - name: Publish to Cloudflare Pages PR Preview and Staging + if: (github.event_name == 'push' && github.ref == 'refs/heads/main') || (github.event_name == 'pull_request' && github.event.pull_request.base.ref == 'main') + uses: cloudflare/pages-action@v1 + with: + apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} + accountId: ${{ env.CLOUDFLARE_ACCOUNT_ID }} + projectName: ${{ env.CLOUDFLARE_PROJECT_NAME }} + directory: ./docs/build + # Optional: Enable this if you want to have GitHub Deployments triggered + gitHubToken: ${{ secrets.GITHUB_TOKEN }} + id: deployCloudflarePages + + - uses: mshick/add-pr-comment@v2 + if: github.event_name == 'pull_request' && github.event.pull_request.base.ref == 'main' + with: + message: | + Preview URL: ${{ steps.deployCloudflarePages.outputs.url }} + - name: Add Custome Domain file - if: github.event_name == 'push' && github.event.pull_request.head.repo.full_name != github.repository + if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') run: echo "${{ vars.DOCUSAURUS_DOMAIN }}" > ./docs/build/CNAME # Popular action to deploy to GitHub Pages: # Docs: https://github.com/peaceiris/actions-gh-pages#%EF%B8%8F-docusaurus - name: Deploy to GitHub Pages - if: github.event_name == 'push' && github.event.pull_request.head.repo.full_name != github.repository + if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') uses: peaceiris/actions-gh-pages@v3 with: github_token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/jan-electron-build.yml b/.github/workflows/jan-electron-build.yml index 34005e068..db585e3c1 100644 --- a/.github/workflows/jan-electron-build.yml +++ b/.github/workflows/jan-electron-build.yml @@ -2,7 +2,7 @@ name: Jan Build Electron App on: push: - tags: ["v*.*.*"] + tags: ["v[0-9]+.[0-9]+.[0-9]+"] jobs: build-macos: From fe3d6825302ca8d128bd930f3675a65c4424d14f Mon Sep 17 00:00:00 2001 From: hiento09 <136591877+hiento09@users.noreply.github.com> Date: Tue, 21 Nov 2023 13:49:32 +0700 Subject: [PATCH 3/3] Enhance Cross-Platform Argument Handling for Nitro Startup Scripts (#674) * Patch all argument of bat script to nitro command run --------- Co-authored-by: Hien To --- plugins/inference-plugin/nitro/win-start.bat | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/inference-plugin/nitro/win-start.bat b/plugins/inference-plugin/nitro/win-start.bat index 7d1e7dc8d..2ad0d8ae8 100644 --- a/plugins/inference-plugin/nitro/win-start.bat +++ b/plugins/inference-plugin/nitro/win-start.bat @@ -2,11 +2,11 @@ rem Attempt to run nitro_windows_amd64_cuda.exe cd win-cuda -nitro.exe +nitro.exe %* rem Check the exit code of the previous command if %errorlevel% neq 0 ( echo nitro_windows_amd64_cuda.exe encountered an error, attempting to run nitro_windows_amd64.exe... cd ..\win-cpu - nitro.exe + nitro.exe %* )