diff --git a/.github/workflows/jan-astro-docs.yml b/.github/workflows/jan-astro-docs.yml new file mode 100644 index 000000000..b551d847d --- /dev/null +++ b/.github/workflows/jan-astro-docs.yml @@ -0,0 +1,98 @@ +name: Jan Astro Docs + +on: + push: + branches: + - dev + paths: + - 'website/**' + - '.github/workflows/jan-astro-docs.yml' + pull_request: + paths: + - 'website/**' + - '.github/workflows/jan-astro-docs.yml' + # Review gh actions docs if you want to further define triggers, paths, etc + # https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on + workflow_dispatch: + +jobs: + deploy: + name: Deploy to CloudFlare Pages + env: + CLOUDFLARE_PROJECT_NAME: astro-docs + runs-on: ubuntu-latest + permissions: + contents: write + deployments: write + pull-requests: write + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 20 + + - uses: oven-sh/setup-bun@v2 + + - name: Install jq + uses: dcarbone/install-jq-action@v2.0.1 + + - name: Fill env vars + continue-on-error: true + working-directory: website + run: | + env_example_file=".env.example" + touch .env + while IFS= read -r line || [[ -n "$line" ]]; do + if [[ "$line" == *"="* ]]; then + var_name=$(echo $line | cut -d '=' -f 1) + echo $var_name + var_value="$(jq -r --arg key "$var_name" '.[$key]' <<< "$SECRETS")" + echo "$var_name=$var_value" >> .env + fi + done < "$env_example_file" + env: + SECRETS: '${{ toJson(secrets) }}' + + - name: Install dependencies + working-directory: website + run: bun install + - name: Build website + working-directory: website + run: bun run build + + - name: copy redirects and headers + continue-on-error: true + working-directory: website + run: | + cp _redirects dist/_redirects + cp _headers dist/_headers + + - name: Publish to Cloudflare Pages PR Preview and Staging + if: github.event_name == 'pull_request' + uses: cloudflare/pages-action@v1 + with: + apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} + accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} + projectName: ${{ env.CLOUDFLARE_PROJECT_NAME }} + directory: ./website/dist + # 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' + with: + message: | + Preview URL Astro Docs: ${{ steps.deployCloudflarePages.outputs.url }} + + - name: Publish to Cloudflare Pages Production + if: (github.event_name == 'push' && github.ref == 'refs/heads/dev') || (github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/dev') + uses: cloudflare/pages-action@v1 + with: + apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} + accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} + projectName: ${{ env.CLOUDFLARE_PROJECT_NAME }} + directory: ./website/dist + branch: main + # Optional: Enable this if you want to have GitHub Deployments triggered + gitHubToken: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/jan-docs-new-release.yaml b/.github/workflows/jan-docs-new-release.yaml deleted file mode 100644 index 0694658cf..000000000 --- a/.github/workflows/jan-docs-new-release.yaml +++ /dev/null @@ -1,63 +0,0 @@ -name: Deploy Docs on new release - -on: - release: - types: - - published - - edited - - released - -jobs: - deploy: - name: Deploy to CloudFlare Pages - env: - CLOUDFLARE_PROJECT_NAME: docs - runs-on: ubuntu-latest - permissions: - contents: write - deployments: write - pull-requests: write - steps: - - uses: actions/checkout@v4 - with: - ref: dev - - uses: actions/setup-node@v3 - with: - node-version: 20 - - - name: Install jq - uses: dcarbone/install-jq-action@v2.0.1 - - - name: Fill env vars - working-directory: docs - run: | - env_example_file=".env.example" - touch .env - while IFS= read -r line || [[ -n "$line" ]]; do - if [[ "$line" == *"="* ]]; then - var_name=$(echo $line | cut -d '=' -f 1) - echo $var_name - var_value="$(jq -r --arg key "$var_name" '.[$key]' <<< "$SECRETS")" - echo "$var_name=$var_value" >> .env - fi - done < "$env_example_file" - env: - SECRETS: '${{ toJson(secrets) }}' - - - name: Install dependencies - working-directory: docs - run: yarn install - - name: Build website - working-directory: docs - run: export NODE_ENV=production && yarn build && cp _redirects out/_redirects && cp _headers out/_headers - - - name: Publish to Cloudflare Pages Production - uses: cloudflare/pages-action@v1 - with: - apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} - accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} - projectName: ${{ env.CLOUDFLARE_PROJECT_NAME }} - directory: ./docs/out - branch: main - # Optional: Enable this if you want to have GitHub Deployments triggered - gitHubToken: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/jan-docs.yml b/.github/workflows/jan-docs.yml index 24673ef22..f64f93f66 100644 --- a/.github/workflows/jan-docs.yml +++ b/.github/workflows/jan-docs.yml @@ -26,7 +26,7 @@ jobs: deployments: write pull-requests: write steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: actions/setup-node@v3 with: node-version: 20 diff --git a/.github/workflows/jan-linter-and-test.yml b/.github/workflows/jan-linter-and-test.yml index 7ad7f67aa..e2f437837 100644 --- a/.github/workflows/jan-linter-and-test.yml +++ b/.github/workflows/jan-linter-and-test.yml @@ -1,4 +1,4 @@ -name: Test - Linter & Playwright +name: Linter & Test on: workflow_dispatch: push: diff --git a/.github/workflows/jan-tauri-build-nightly.yaml b/.github/workflows/jan-tauri-build-nightly.yaml index ca15654c3..106174eff 100644 --- a/.github/workflows/jan-tauri-build-nightly.yaml +++ b/.github/workflows/jan-tauri-build-nightly.yaml @@ -20,6 +20,7 @@ on: jobs: set-public-provider: runs-on: ubuntu-latest + if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository outputs: public_provider: ${{ steps.set-public-provider.outputs.public_provider }} ref: ${{ steps.set-public-provider.outputs.ref }} @@ -47,11 +48,13 @@ jobs: fi # Job create Update app version based on latest release tag with build number and save to output get-update-version: + if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository uses: ./.github/workflows/template-get-update-version.yml build-macos: uses: ./.github/workflows/template-tauri-build-macos.yml needs: [get-update-version, set-public-provider] + if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository secrets: inherit with: ref: ${{ needs.set-public-provider.outputs.ref }} @@ -64,6 +67,7 @@ jobs: uses: ./.github/workflows/template-tauri-build-windows-x64.yml secrets: inherit needs: [get-update-version, set-public-provider] + if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository with: ref: ${{ needs.set-public-provider.outputs.ref }} public_provider: ${{ needs.set-public-provider.outputs.public_provider }} @@ -74,6 +78,7 @@ jobs: uses: ./.github/workflows/template-tauri-build-linux-x64.yml secrets: inherit needs: [get-update-version, set-public-provider] + if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository with: ref: ${{ needs.set-public-provider.outputs.ref }} public_provider: ${{ needs.set-public-provider.outputs.public_provider }} @@ -91,6 +96,7 @@ jobs: build-macos, ] runs-on: ubuntu-latest + if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository steps: - name: Getting the repo uses: actions/checkout@v3 @@ -224,49 +230,3 @@ jobs: RUN_ID=${{ github.run_id }} COMMENT="This is the build for this pull request. You can download it from the Artifacts section here: [Build URL](https://github.com/${{ github.repository }}/actions/runs/${RUN_ID})." gh pr comment $PR_URL --body "$COMMENT" - - # AutoQA trigger for S3 builds - trigger-autoqa-s3: - needs: - [ - build-macos, - build-windows-x64, - build-linux-x64, - get-update-version, - set-public-provider, - sync-temp-to-latest, - ] - if: needs.set-public-provider.outputs.public_provider == 'aws-s3' - uses: ./.github/workflows/autoqa-template.yml - with: - jan_app_windows_source: 'https://delta.jan.ai/nightly/Jan-nightly_${{ needs.get-update-version.outputs.new_version }}_x64-setup.exe' - jan_app_ubuntu_source: 'https://delta.jan.ai/nightly/Jan-nightly_${{ needs.get-update-version.outputs.new_version }}_amd64.deb' - jan_app_macos_source: 'https://delta.jan.ai/nightly/Jan-nightly_${{ needs.get-update-version.outputs.new_version }}_universal.dmg' - is_nightly: true - source_type: 'url' - secrets: - RP_TOKEN: ${{ secrets.RP_TOKEN }} - - # AutoQA trigger for artifact builds - trigger-autoqa-artifacts: - needs: - [ - build-macos, - build-windows-x64, - build-linux-x64, - get-update-version, - set-public-provider, - ] - if: needs.set-public-provider.outputs.public_provider == 'none' - uses: ./.github/workflows/autoqa-template.yml - with: - jan_app_windows_source: '' # Not needed for artifacts - jan_app_ubuntu_source: '' # Not needed for artifacts - jan_app_macos_source: '' # Not needed for artifacts - is_nightly: true - source_type: 'local' - artifact_name_windows: 'jan-windows-${{ needs.get-update-version.outputs.new_version }}' - artifact_name_ubuntu: 'jan-linux-amd64-${{ needs.get-update-version.outputs.new_version }}-deb' - artifact_name_macos: 'jan-nightly-mac-universal-${{ needs.get-update-version.outputs.new_version }}.dmg' - secrets: - RP_TOKEN: ${{ secrets.RP_TOKEN }} diff --git a/.vscode/extensions.json b/.vscode/extensions.json deleted file mode 100644 index 0f148de5e..000000000 --- a/.vscode/extensions.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "recommendations": [ - "esbenp.prettier-vscode" - ] -} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index 78bf4f0ab..000000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "editor.defaultFormatter": "esbenp.prettier-vscode", - "editor.formatOnSave": true, - "[rust]": { - "editor.defaultFormatter": "rust-lang.rust-analyzer" - } -} diff --git a/README.md b/README.md index 5b3655ba8..41a41af46 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Jan - Local AI Assistant - +
@@ -12,62 +12,50 @@
- Getting Started - - Docs - - Changelog - - Bug reports + Getting Started + - Docs + - Changelog + - Bug reports - Discord
-Jan is a ChatGPT-alternative that runs 100% offline on your device. Our goal is to make it easy for a layperson to download and run LLMs and use AI with **full control** and **privacy**. - -**⚠️ Jan is in active development.** +Jan is an AI assistant that can run 100% offline on your device. Download and run LLMs with +**full control** and **privacy**. ## Installation -Because clicking a button is still the easiest way to get started: +The easiest way to get started is by downloading one of the following versions for your respective operating system:| Platform | Stable | -Beta | Nightly |
| Windows | jan.exe | -jan.exe | jan.exe |
| macOS | jan.dmg | -jan.dmg | jan.dmg |
| Linux (deb) | jan.deb | -jan.deb | jan.deb |
| Linux (AppImage) | jan.AppImage | -jan.AppImage | jan.AppImage |
- We're working on the next stage of Jan - making our local assistant more powerful and available in more platforms. -
-- Access Jan directly from your browser with our powerful web interface -
-- Take Jan on the go with our native mobile applications -
-- Integrate Jan's capabilities into your applications with our API -
-