Skip to content

Commit 353cae1

Browse files
ajitpratap0Ajit Pratap Singhclaude
authored
feat(website): migrate deployment from GitHub Pages to Vercel (#394)
* fix(website): enable Next.js static export for GitHub Pages deployment - Add output: 'export' and images.unoptimized for static site generation - Update workflow artifact path from dist to out (Next.js export output dir) - Restore CNAME file to preserve gosqlx.dev custom domain on deploy Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * feat(website): migrate deployment from GitHub Pages to Vercel - Build WASM in CI (requires Go), then deploy prebuilt output to Vercel - Vercel project: gosqlx-website (prj_dC5W1JVnUjCEZ25UQS4XqyXKSwPV) - Custom domain gosqlx.dev configured on Vercel project - Drop pages/id-token permissions, no longer needed Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix(website): remove output: export — not needed for Vercel deployment Static export was added for GitHub Pages but breaks Vercel features (headers, redirects, sitemap route). Vercel handles SSR natively. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> --------- Co-authored-by: Ajit Pratap Singh <ajitpratapsingh@Ajits-Mac-mini-2655.local> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 4aed236 commit 353cae1

2 files changed

Lines changed: 29 additions & 24 deletions

File tree

.github/workflows/website.yml

Lines changed: 28 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,19 @@ on:
1111

1212
permissions:
1313
contents: read
14-
pages: write
15-
id-token: write
1614

1715
concurrency:
18-
group: pages
16+
group: vercel-production
1917
cancel-in-progress: true
2018

2119
jobs:
22-
build:
20+
deploy:
2321
runs-on: ubuntu-latest
24-
timeout-minutes: 15
22+
timeout-minutes: 20
23+
environment:
24+
name: production
25+
url: https://gosqlx.dev
26+
2527
steps:
2628
- uses: actions/checkout@v4
2729

@@ -44,24 +46,26 @@ jobs:
4446
cache: 'npm'
4547
cache-dependency-path: website/package-lock.json
4648

47-
- name: Install and build website
48-
run: |
49-
cd website
50-
npm ci
51-
npm run build
49+
- name: Install Vercel CLI
50+
run: npm install -g vercel@latest
5251

53-
- name: Upload Pages artifact
54-
uses: actions/upload-pages-artifact@v3
55-
with:
56-
path: website/dist
52+
- name: Pull Vercel environment
53+
run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }}
54+
working-directory: website
55+
env:
56+
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
57+
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
5758

58-
deploy:
59-
needs: build
60-
runs-on: ubuntu-latest
61-
environment:
62-
name: github-pages
63-
url: ${{ steps.deployment.outputs.page_url }}
64-
steps:
65-
- name: Deploy to GitHub Pages
66-
id: deployment
67-
uses: actions/deploy-pages@v4
59+
- name: Build with Vercel
60+
run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }}
61+
working-directory: website
62+
env:
63+
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
64+
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
65+
66+
- name: Deploy to Vercel
67+
run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }}
68+
working-directory: website
69+
env:
70+
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
71+
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}

website/public/CNAME

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
gosqlx.dev

0 commit comments

Comments
 (0)