Skip to content

Commit 88d084f

Browse files
committed
migrate website to nextjs
1 parent 95e3900 commit 88d084f

File tree

187 files changed

+10752
-18962
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

187 files changed

+10752
-18962
lines changed

.github/dependabot.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@ updates:
1313
patterns:
1414
- 'react'
1515
- 'react-dom'
16-
docusaurus:
17-
patterns:
18-
- '@docusaurus/*'
1916

2017
- package-ecosystem: 'github-actions'
2118
directory: '/'

.github/workflows/deploy.yml

Lines changed: 33 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,34 +2,55 @@ name: Deploy to GitHub Pages
22

33
on:
44
schedule:
5-
- cron: "0 0 * * *"
5+
- cron: '0 0 * * *'
66
push:
77
branches:
88
- main
99
workflow_dispatch:
1010

1111
jobs:
1212
build:
13-
name: Build Docusaurus
13+
name: Build Website
1414
runs-on: ubuntu-latest
1515
steps:
16-
- uses: actions/checkout@v5
17-
with:
18-
fetch-depth: 0
19-
- uses: actions/setup-node@v4
16+
- name: Checkout
17+
uses: actions/checkout@v4
18+
19+
- name: Install Node.js
20+
uses: actions/setup-node@v4
2021
with:
21-
node-version: 18
22+
node-version: 22
2223
cache: npm
2324

2425
- name: Install dependencies
25-
run: npm ci
26-
- name: Build website
27-
run: npm run build
26+
run: npm install
27+
28+
- name: Setup Pages
29+
id: setup_pages
30+
uses: actions/configure-pages@v5
31+
32+
- name: Restore cache
33+
uses: actions/cache@v4
34+
with:
35+
path: |
36+
.next/cache
37+
# Generate a new cache whenever packages or source files change.
38+
key:
39+
${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-${{
40+
hashFiles('**.[jt]s', '**.[jt]sx') }}
41+
# If source files changed but packages didn't, rebuild from a prior cache.
42+
restore-keys: |
43+
${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-
44+
45+
- name: Build with Next.js
46+
run: NEXT_PUBLIC_BASE_URL=https://sdkman.io npm run build
47+
env:
48+
PAGES_BASE_PATH: ${{ steps.setup_pages.outputs.base_path }}
2849

29-
- name: Upload Build Artifact
50+
- name: Upload artifact
3051
uses: actions/upload-pages-artifact@v4
3152
with:
32-
path: build
53+
path: ./out
3354

3455
deploy:
3556
name: Deploy to GitHub Pages

.github/workflows/test-deploy.yml

Lines changed: 28 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,36 @@ jobs:
1010
name: Test deployment
1111
runs-on: ubuntu-latest
1212
steps:
13-
- uses: actions/checkout@v5
14-
with:
15-
fetch-depth: 0
16-
- uses: actions/setup-node@v4
13+
- name: Checkout
14+
uses: actions/checkout@v4
15+
16+
- name: Install Node.js
17+
uses: actions/setup-node@v4
1718
with:
18-
node-version: 18
19+
node-version: 22
1920
cache: npm
2021

2122
- name: Install dependencies
22-
run: npm ci
23-
- name: Test build website
23+
run: npm install
24+
25+
- name: Setup Pages
26+
id: setup_pages
27+
uses: actions/configure-pages@v5
28+
29+
- name: Restore cache
30+
uses: actions/cache@v4
31+
with:
32+
path: |
33+
.next/cache
34+
# Generate a new cache whenever packages or source files change.
35+
key:
36+
${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-${{
37+
hashFiles('**.[jt]s', '**.[jt]sx') }}
38+
# If source files changed but packages didn't, rebuild from a prior cache.
39+
restore-keys: |
40+
${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-
41+
42+
- name: Build with Next.js
2443
run: npm run build
44+
env:
45+
PAGES_BASE_PATH: ${{ steps.setup_pages.outputs.base_path }}

.gitignore

Lines changed: 30 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,41 @@
1-
# Dependencies
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
24
/node_modules
5+
/.pnp
6+
.pnp.*
7+
.yarn/*
8+
!.yarn/patches
9+
!.yarn/plugins
10+
!.yarn/releases
11+
!.yarn/versions
312

4-
# Production
5-
/build
13+
# testing
14+
/coverage
615

7-
# Generated files
8-
.docusaurus
9-
.cache-loader
16+
# next.js
17+
/.next/
18+
/out/
1019

11-
# Misc
20+
# production
21+
/build
22+
23+
# misc
1224
.DS_Store
13-
.env.local
14-
.env.development.local
15-
.env.test.local
16-
.env.production.local
25+
*.pem
1726

27+
# debug
1828
npm-debug.log*
1929
yarn-debug.log*
2030
yarn-error.log*
31+
.pnpm-debug.log*
32+
33+
# env files (can opt-in for committing if needed)
34+
.env*
2135

22-
# Hide preprocessing out
23-
/preprocessing/out
36+
# vercel
37+
.vercel
2438

25-
# Hide auto generated doc pages
26-
/docs/jdks.mdx
27-
/docs/sdks.mdx
28-
/src/data/jdks-versions.ts
29-
/src/data/sdks.ts
39+
# typescript
40+
*.tsbuildinfo
41+
next-env.d.ts

.prettierrc

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
{
22
"singleQuote": true,
33
"proseWrap": "always",
4-
"plugins": ["@trivago/prettier-plugin-sort-imports"],
4+
"plugins": [
5+
"@trivago/prettier-plugin-sort-imports",
6+
"prettier-plugin-tailwindcss"
7+
],
58
"importOrder": [
6-
"^@site/src/types/(.*)$",
9+
"^@/types/(.*)$",
710
"^react(/[^\\/]+)?$",
11+
"^next(/[^\\/]+)?$",
812
"<THIRD_PARTY_MODULES>",
9-
"^@site/src/components/(.*)$",
10-
"^@site/src/hooks/(.*)$",
11-
"^@site/src/lib/(.*)$",
12-
"^@site/src/data/(.*)$",
13-
"^@site/src/(.*)$",
13+
"^@/(.*)$",
1414
"^[./]"
1515
],
1616
"importOrderSeparation": true,

README.md

Lines changed: 8 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<p align="center">
2-
<a href="https://sdkman.io">SDKMAN!</a> Website built using <a href="https://docusaurus.io/">Docusaurus</a>, a modern static website generator.
2+
<a href="https://sdkman.io">SDKMAN!</a> Website built using <a href="https://nextjs.org">Next.js</a>.
33
</p>
44
<br />
55

@@ -11,32 +11,18 @@ $ npm i
1111

1212
### Local Development
1313

14+
```bash
15+
$ npm run dev
1416
```
15-
$ npm start
16-
```
17-
18-
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
1917

20-
### Build
18+
### Local Build
2119

22-
```
20+
```bash
2321
$ npm run build
2422
```
2523

26-
This command generates static content into the `build` directory and can be served using any static contents hosting service.
24+
### Production Build
2725

28-
### Deployment
29-
30-
Using SSH:
31-
32-
```
33-
$ USE_SSH=true npm run deploy
26+
```bash
27+
$ NEXT_PUBLIC_BASE_URL=https://sdkman.io npm run build
3428
```
35-
36-
Not using SSH:
37-
38-
```
39-
$ GIT_USER=<Your GitHub username> npm run deploy
40-
```
41-
42-
If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.

babel.config.js

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

components.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"$schema": "https://ui.shadcn.com/schema.json",
3+
"style": "new-york",
4+
"rsc": true,
5+
"tsx": true,
6+
"tailwind": {
7+
"config": "",
8+
"css": "src/app/globals.css",
9+
"baseColor": "neutral",
10+
"cssVariables": true,
11+
"prefix": ""
12+
},
13+
"aliases": {
14+
"components": "@/components",
15+
"utils": "@/lib/utils",
16+
"ui": "@/components/ui",
17+
"lib": "@/lib",
18+
"hooks": "@/hooks"
19+
},
20+
"iconLibrary": "lucide"
21+
}

0 commit comments

Comments
 (0)