Skip to content

Commit d26a254

Browse files
authored
feat(docs): migrate from AWS Amplify to GitHub Pages deployment (#5)
* feat(docs): add Amplify redirects for /hub/ subpath Add _redirects file to handle Amplify routing for Docusaurus site served at /hub/ path * fix(docs): configure rewrites for /hub/ subdirectory deployment - Update _redirects file with proper asset rewrite rules for AWS Amplify - Add security headers to amplify.yml - Ensure asset paths (/hub/assets/*) are correctly mapped to build outputs Fixes asset loading issues when serving docs from /hub/ subpath * feat(docs): migrate from AWS Amplify to GitHub Pages deployment - Remove amplify.yml and Amplify-specific configuration - Remove _redirects file (not needed for GitHub Pages) - Add GitHub Actions workflow for automated deployment - Deploy docs to GitHub Pages on push to main - Configure CNAME for formbricks.com The workflow automatically builds and deploys documentation to gh-pages branch on every commit to main. * chore(docs): update Node.js version to 22 LTS in workflow * chore(docs): update pnpm version to 10 in workflow * fix(docs): remove CNAME from GitHub Pages deployment CNAME conflicts with DNS records for main marketing site. Using Next.js rewrites instead, so docs will be accessible via formbricks.com/hub/ without requiring DNS changes. * feat(docs): configure hub.formbricks.com subdomain deployment - Add CNAME for hub.formbricks.com in GitHub Pages deployment - Update Docusaurus URL to https://hub.formbricks.com - Change baseUrl from /hub/ to / for root-level hosting - This provides a cleaner subdomain approach for marketing purposes DNS Setup Required: Add CNAME record: hub.formbricks.com -> formbricks.github.io
1 parent aa5f70a commit d26a254

File tree

3 files changed

+50
-24
lines changed

3 files changed

+50
-24
lines changed

.github/workflows/deploy-docs.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Deploy Documentation
2+
3+
on:
4+
push:
5+
branches: [main]
6+
paths:
7+
- 'apps/docs/**'
8+
- 'package.json'
9+
- 'pnpm-lock.yaml'
10+
11+
permissions:
12+
contents: write
13+
14+
jobs:
15+
deploy:
16+
name: Deploy to GitHub Pages
17+
runs-on: ubuntu-latest
18+
19+
steps:
20+
- name: Checkout code
21+
uses: actions/checkout@v5
22+
23+
- name: Setup pnpm
24+
uses: pnpm/action-setup@v3
25+
with:
26+
version: 10
27+
28+
- name: Setup Node.js
29+
uses: actions/setup-node@v6
30+
with:
31+
node-version: '22'
32+
cache: 'pnpm'
33+
34+
- name: Install dependencies
35+
working-directory: apps/docs
36+
run: pnpm install --frozen-lockfile
37+
38+
- name: Build documentation
39+
working-directory: apps/docs
40+
run: pnpm build
41+
42+
- name: Deploy to GitHub Pages
43+
uses: peaceiris/actions-gh-pages@v4
44+
with:
45+
github_token: ${{ secrets.GITHUB_TOKEN }}
46+
publish_dir: apps/docs/build
47+
cname: hub.formbricks.com
48+

amplify.yml

Lines changed: 0 additions & 22 deletions
This file was deleted.

apps/docs/docusaurus.config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ const config: Config = {
1616
},
1717

1818
// Set the production url of your site here
19-
url: "https://formbricks.com",
19+
url: "https://hub.formbricks.com",
2020
// Set the /<baseUrl>/ pathname under which your site is served
2121
// For GitHub pages deployment, it is often '/<projectName>/'
22-
baseUrl: "/hub/",
22+
baseUrl: "/",
2323

2424
// GitHub pages deployment config.
2525
// If you aren't using GitHub pages, you don't need these.

0 commit comments

Comments
 (0)