Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Setup up ente.io/help

Manav Rathi01281f70dc4f
diff --git a/.github/workflows/docs-deploy-redirect.yml b/.github/workflows/docs-deploy-redirect.yml
new file mode 100644
index 0000000000..261ac83a12
--- /dev/null
+++ b/.github/workflows/docs-deploy-redirect.yml
@@ -0,0 +1,31 @@
+name: "Deploy (help.ente.io redirect)"
+
+on:
+ # Run when the redirect file changes
+ push:
+ branches: [main]
+ paths:
+ - "infra/services/help-redir/**"
+ - ".github/workflows/docs-deploy-redirect.yml"
+ # Also allow manually running the workflow
+ workflow_dispatch:
+
+permissions:
+ contents: read
+
+jobs:
+ deploy:
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v4
+
+ - name: Deploy redirect to help.ente.io
+ uses: cloudflare/wrangler-action@v3
+ with:
+ accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
+ apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
+ # Deploy the redirect file to the existing ente project's help branch
+ # This will replace the current help.ente.io content with just redirects
+ command: pages deploy --project-name=ente --commit-dirty=true --branch=help infra/services/help-redir
diff --git a/.github/workflows/docs-deploy.yml b/.github/workflows/docs-deploy.yml
index 10fc84fe5f..778ef4fd59 100644
--- a/.github/workflows/docs-deploy.yml
+++ b/.github/workflows/docs-deploy.yml
@@ -44,4 +44,4 @@ jobs:
with:
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
- command: pages deploy --project-name=ente --commit-dirty=true --branch=help docs/docs/.vitepress/dist
+ command: pages deploy --project-name=ente --commit-dirty=true --branch=help-content docs/docs/.vitepress/dist
diff --git a/docs/docs/.vitepress/config.ts b/docs/docs/.vitepress/config.ts
index 682a8b1a7a..615e95f505 100644
--- a/docs/docs/.vitepress/config.ts
+++ b/docs/docs/.vitepress/config.ts
@@ -3,6 +3,7 @@ import { sidebar } from "./sidebar";
// https://vitepress.dev/reference/site-config
export default defineConfig({
+ base: "/help/", // Serve under /help path
title: "Ente Help",
description: "Documentation and help for Ente's products",
head: [["link", { rel: "icon", type: "image/png", href: "/favicon.png" }]],
diff --git a/infra/services/help-redir/_redirects b/infra/services/help-redir/_redirects
new file mode 100644
index 0000000000..8f8d39ad8d
--- /dev/null
+++ b/infra/services/help-redir/_redirects
@@ -0,0 +1,5 @@
+# Redirect all traffic from help.ente.io to ente.io/help
+# Using 301 (permanent redirect)
+# Splat pattern preserves the entire path
+
+https://help.ente.io/* https://ente.io/help/:splat 301!