Skip to content

Commit 45ac427

Browse files
committed
Source codes
1 parent cf3dd21 commit 45ac427

File tree

15 files changed

+6881
-2
lines changed

15 files changed

+6881
-2
lines changed

docs/CNAME

Lines changed: 0 additions & 1 deletion
This file was deleted.

website

Lines changed: 0 additions & 1 deletion
This file was deleted.

website/.gitignore

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# build output
2+
dist/
3+
# generated types
4+
.astro/
5+
6+
# dependencies
7+
node_modules/
8+
9+
# logs
10+
npm-debug.log*
11+
yarn-debug.log*
12+
yarn-error.log*
13+
pnpm-debug.log*
14+
15+
16+
# environment variables
17+
.env
18+
.env.production
19+
20+
# macOS-specific files
21+
.DS_Store
22+
23+
# jetbrains setting folder
24+
.idea/

website/DEPLOYMENT.md

Lines changed: 182 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,182 @@
1+
# Deployment Guide
2+
3+
This guide covers deploying the Peon landing page to various hosting platforms.
4+
5+
## Prerequisites
6+
7+
- Node.js 18+ installed
8+
- Project built successfully (`npm run build`)
9+
10+
## Vercel
11+
12+
### Quick Deploy
13+
14+
```bash
15+
npm install -g vercel
16+
vercel
17+
```
18+
19+
### Vercel Configuration
20+
21+
Create `vercel.json`:
22+
23+
```json
24+
{
25+
"buildCommand": "npm run build",
26+
"outputDirectory": "dist",
27+
"devCommand": "npm run dev",
28+
"installCommand": "npm install"
29+
}
30+
```
31+
32+
## Netlify
33+
34+
### Quick Deploy
35+
36+
```bash
37+
npm install -g netlify-cli
38+
netlify deploy --prod
39+
```
40+
41+
### Netlify Configuration
42+
43+
Create `netlify.toml`:
44+
45+
```toml
46+
[build]
47+
command = "npm run build"
48+
publish = "dist"
49+
50+
[[redirects]]
51+
from = "/*"
52+
to = "/index.html"
53+
status = 200
54+
```
55+
56+
## Cloudflare Pages
57+
58+
1. Push code to GitHub/GitLab
59+
2. Connect repository in Cloudflare Pages dashboard
60+
3. Set build settings:
61+
- Build command: `npm run build`
62+
- Build output directory: `dist`
63+
- Root directory: `/website`
64+
65+
## GitHub Pages
66+
67+
### Manual Deploy
68+
69+
```bash
70+
npm run build
71+
cd dist
72+
git init
73+
git add .
74+
git commit -m "Deploy to GitHub Pages"
75+
git branch -M gh-pages
76+
git remote add origin <your-repo-url>
77+
git push -f origin gh-pages
78+
```
79+
80+
### Automated with GitHub Actions
81+
82+
Create `.github/workflows/deploy.yml`:
83+
84+
```yaml
85+
name: Deploy to GitHub Pages
86+
87+
on:
88+
push:
89+
branches: [main]
90+
91+
jobs:
92+
build:
93+
runs-on: ubuntu-latest
94+
steps:
95+
- uses: actions/checkout@v3
96+
- uses: actions/setup-node@v3
97+
with:
98+
node-version: 18
99+
- run: npm install
100+
- run: npm run build
101+
- uses: peaceiris/actions-gh-pages@v3
102+
with:
103+
github_token: ${{ secrets.GITHUB_TOKEN }}
104+
publish_dir: ./dist
105+
```
106+
107+
## Custom Server
108+
109+
### Using a simple HTTP server
110+
111+
```bash
112+
npm run build
113+
cd dist
114+
npx http-server -p 8080
115+
```
116+
117+
### Using Nginx
118+
119+
```nginx
120+
server {
121+
listen 80;
122+
server_name peon.dev;
123+
root /var/www/peon/dist;
124+
index index.html;
125+
126+
location / {
127+
try_files $uri $uri/ /index.html;
128+
}
129+
130+
# Enable gzip compression
131+
gzip on;
132+
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
133+
}
134+
```
135+
136+
## Environment Variables
137+
138+
No environment variables are required for this static site.
139+
140+
## Domain Configuration
141+
142+
After deploying, configure your custom domain:
143+
144+
1. Add DNS records pointing to your hosting provider
145+
2. Enable SSL/HTTPS (automatic on Vercel, Netlify, Cloudflare)
146+
3. Verify site is accessible at https://peon.dev
147+
148+
## Performance Optimization
149+
150+
The site is already optimized with:
151+
- Static generation (no JavaScript required for rendering)
152+
- Tailwind CSS (minimal CSS)
153+
- No external dependencies on page load
154+
- Optimized fonts (Google Fonts with preconnect)
155+
156+
## Monitoring
157+
158+
Recommended tools:
159+
- Google Analytics (add to layout)
160+
- Vercel Analytics
161+
- Cloudflare Analytics
162+
- Plausible (privacy-friendly)
163+
164+
## Troubleshooting
165+
166+
### Build fails
167+
168+
```bash
169+
rm -rf node_modules package-lock.json
170+
npm install
171+
npm run build
172+
```
173+
174+
### Styles not loading
175+
176+
- Check that `src/styles/global.css` is imported in Layout
177+
- Verify Tailwind configuration in `astro.config.mjs`
178+
179+
### 404 errors
180+
181+
- Ensure hosting platform serves `index.html` for all routes
182+
- Check that `dist/` directory contains `index.html`

0 commit comments

Comments
 (0)