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/.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/docs/src/pages/platforms/_meta.json b/docs/src/pages/platforms/_meta.json deleted file mode 100644 index bfee4c12e..000000000 --- a/docs/src/pages/platforms/_meta.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "-- Switcher": { - "type": "separator", - "title": "Switcher" - }, - "index": { - "display": "hidden" - } -} diff --git a/docs/src/pages/platforms/index.mdx b/docs/src/pages/platforms/index.mdx deleted file mode 100644 index 1ba0ff3a7..000000000 --- a/docs/src/pages/platforms/index.mdx +++ /dev/null @@ -1,87 +0,0 @@ ---- -title: Coming Soon -description: Exciting new features and platforms are on the way. Stay tuned for Jan Web, Jan Mobile, and our API Platform. -keywords: - [ - Jan, - Customizable Intelligence, LLM, - local AI, - privacy focus, - free and open source, - private and offline, - conversational AI, - no-subscription fee, - large language models, - coming soon, - Jan Web, - Jan Mobile, - API Platform, - ] ---- - -import { Callout } from 'nextra/components' - -
- 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 -
-