Skip to content

Commit 6913205

Browse files
authored
Merge pull request #21 from vplend/dev
[2.0.0] (WIP) Migration to NextJS&Fumadocs
2 parents e3e6d2e + b5eff6e commit 6913205

File tree

1,191 files changed

+35253
-59477
lines changed

Some content is hidden

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

1,191 files changed

+35253
-59477
lines changed

.github/workflows/deploy.yml

Lines changed: 33 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -9,34 +9,36 @@ jobs:
99
runs-on: ubuntu-latest
1010

1111
steps:
12-
- name: Checkout code
13-
uses: actions/checkout@v4
14-
15-
- name: Set up Node.js
16-
uses: actions/setup-node@v3
17-
with:
18-
node-version: '18'
19-
20-
- name: Install Bun
21-
run: |
22-
curl -fsSL https://bun.sh/install | bash
23-
echo "$HOME/.bun/bin" >> $GITHUB_PATH
24-
25-
- name: Install dependencies
26-
run: bun install && bun install:pulse-ru && bun install:pulse-en
27-
28-
- name: Build project
29-
run: bun run build:all
30-
31-
- name: Deploy to server
32-
uses: easingthemes/ssh-deploy@main
33-
with:
34-
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
35-
ARGS: "-rlgoDzvc -i"
36-
SOURCE: "dist/*"
37-
REMOTE_HOST: ${{ secrets.REMOTE_HOST }}
38-
REMOTE_USER: ${{ secrets.REMOTE_USER }}
39-
REMOTE_PORT: ${{ secrets.REMOTE_PORT }}
40-
TARGET: ${{ secrets.REMOTE_TARGET }}
41-
SCRIPT_BEFORE: |
42-
rm -rf ${{ secrets.REMOTE_TARGET }}/*
12+
- name: Checkout code
13+
uses: actions/checkout@v4
14+
15+
- name: Set up Node.js
16+
uses: actions/setup-node@v3
17+
with:
18+
node-version: '18'
19+
20+
- name: Install dependencies
21+
run: npm ci
22+
23+
- name: Build project
24+
run: npm run build
25+
26+
- name: Copy static files
27+
run: cp -r .next/static .next/standalone/.next/
28+
29+
- name: Deploy to server
30+
uses: easingthemes/ssh-deploy@main
31+
with:
32+
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
33+
ARGS: "-rlgoDzvc -i"
34+
SOURCE: ".next/standalone/*"
35+
REMOTE_HOST: ${{ secrets.REMOTE_HOST }}
36+
REMOTE_USER: ${{ secrets.REMOTE_USER }}
37+
REMOTE_PORT: ${{ secrets.REMOTE_PORT }}
38+
TARGET: ${{ secrets.REMOTE_TARGET }}
39+
SCRIPT_BEFORE: |
40+
pm2 stop next-app 2>/dev/null || true
41+
rm -rf ${{ secrets.REMOTE_TARGET }}/*
42+
SCRIPT_AFTER: |
43+
cd ${{ secrets.REMOTE_TARGET }}
44+
pm2 start server.js --name "next-app"

.gitignore

Lines changed: 34 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,44 @@
1-
# build output
2-
dist/
3-
4-
# generated types
5-
.astro/
6-
package-lock.json
7-
bun.lock
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
82

93
# dependencies
10-
node_modules/
4+
/node_modules
5+
/.pnp
6+
.pnp.*
7+
.yarn/*
8+
!.yarn/patches
9+
!.yarn/plugins
10+
!.yarn/releases
11+
!.yarn/versions
12+
13+
# testing
14+
/coverage
15+
16+
# next.js
17+
/.next/
18+
/out/
19+
/.source
20+
21+
# production
22+
/build
23+
24+
# misc
25+
.DS_Store
26+
*.pem
1127

12-
# logs
28+
# debug
1329
npm-debug.log*
1430
yarn-debug.log*
1531
yarn-error.log*
16-
pnpm-debug.log*
17-
18-
# environment variables
19-
.env
20-
.env.production
32+
.pnpm-debug.log*
2133

22-
# macOS-specific files
23-
.DS_Store
34+
# env files (can opt-in for committing if needed)
35+
.env*
2436

25-
# jetbrains setting folder
26-
.idea/
37+
# vercel
2738
.vercel
2839

29-
FlectonePulseDocs.iml
30-
.vitepress/dist/*
31-
/.idea/*
32-
/pulse/ru/.vitepress/dist/
33-
/pulse/ru/.vitepress/cache/
34-
/pulse/en/.vitepress/dist/
35-
/pulse/en/.vitepress/cache/
36-
/.vscode/*
40+
# typescript
41+
*.tsbuildinfo
42+
next-env.d.ts
43+
44+

CONTRIBUTING.md

Lines changed: 26 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
11
# 🤝 Contributing to Flectone Web
22

3-
Thanks for wanting to help! Here’s how to get started.
3+
Thanks for wanting to help! Here’s how to get started with our Next.js & Fumadocs based project.
44

55
---
66

77
## 🛠️ Getting Started
88

99
1. **Fork the repo** on GitHub.
1010
2. **Clone your fork** locally.
11-
3. **Install dependencies** using Bun.
11+
3. **Install dependencies** using npm:
12+
```bash
13+
npm install
14+
```
1215
4. **Create a branch** for your changes.
1316
5. **Make your changes** and test them.
1417
6. **Commit and push** your changes.
@@ -23,38 +26,47 @@ Thanks for wanting to help! Here’s how to get started.
2326
- Include screenshots or logs if needed.
2427

2528
### Code Contributions
26-
- Follow existing code style.
27-
- Test your changes.
29+
- Follow existing code style (we use ESLint).
30+
- Test your changes by running the development server.
2831
- Keep PRs focused on one issue or feature.
32+
- If you are adding documentation for **Pulse**, place it in `src/pulse/` or relevant `[lang]` directories.
2933

3034
### Documentation
31-
- Fix typos, outdated info, or unclear sections.
35+
- We use **MDX** with **Fumadocs**.
36+
- Use `<include>` tags for reusable parts and localizations where possible, following the pattern in existing `.mdx` files.
37+
- Fix typos, outdated info, or unclear sections in `src/messages/` (JSON) or content files.
3238

3339
---
3440

3541
## 🚀 Development
3642

3743
### Running the Project
38-
- Start Astro dev server: `bun run dev`
39-
- Start VitePress (RU): `bun run dev:pulse`
40-
- Start VitePress (EN): `bun run dev:en-pulse`
44+
- Start the development server:
45+
```bash
46+
npm run dev
47+
```
48+
- The site will be available at `http://localhost:3000`.
4149

4250
### Building the Project
43-
- Build Astro: `bun run build`
44-
- Build VitePress (RU): `bun run build:pulse`
45-
- Build VitePress (EN): `bun run build:en-pulse`
46-
- Build everything: `bun run build:all`
51+
- Build the Next.js application:
52+
```bash
53+
npm run build
54+
```
55+
- To check for production errors locally:
56+
```bash
57+
npm run start
58+
```
4759

4860
---
4961

5062
## 🧐 Code Review
5163

5264
- PRs will be reviewed by maintainers.
5365
- Feedback will be provided if changes are needed.
54-
- Once approved, your changes will be merged.
66+
- Once approved, your changes will be merged into the main branch.
5567

5668
---
5769

5870
## 🙏 Thanks!
5971

60-
Your contributions make Flectone Web better. Happy coding! 🚀
72+
Your contributions make Flectone Web better. Happy coding! 🚀

0 commit comments

Comments
 (0)