Skip to content

Commit 8bd71f1

Browse files
committed
publish website
1 parent b74fd97 commit 8bd71f1

Some content is hidden

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

63 files changed

+4276
-28
lines changed

.github/workflows/deploy-node.yml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: Deploy Node.js Website
2+
3+
on:
4+
push:
5+
branches:
6+
- website
7+
paths:
8+
- 'website_node/**'
9+
- '.github/workflows/deploy-node.yml'
10+
workflow_dispatch:
11+
12+
permissions:
13+
contents: read
14+
pages: write
15+
id-token: write
16+
17+
concurrency:
18+
group: "pages"
19+
cancel-in-progress: false
20+
21+
jobs:
22+
build:
23+
runs-on: ubuntu-latest
24+
25+
steps:
26+
- name: Checkout repository
27+
uses: actions/checkout@v4
28+
29+
- name: Generate package-lock.json for caching
30+
working-directory: ./website_node
31+
run: npm install --package-lock-only
32+
33+
- name: Setup Node.js
34+
uses: actions/setup-node@v4
35+
with:
36+
node-version: '25'
37+
cache: 'npm'
38+
cache-dependency-path: website_node/package-lock.json
39+
40+
- name: Setup Pages
41+
uses: actions/configure-pages@v4
42+
43+
- name: Install dependencies
44+
working-directory: ./website_node
45+
run: npm ci
46+
47+
- name: Build static site
48+
working-directory: ./website_node
49+
run: npm run build
50+
51+
- name: Upload artifact
52+
uses: actions/upload-pages-artifact@v3
53+
with:
54+
path: ./website_node/public
55+
56+
deploy:
57+
environment:
58+
name: github-pages
59+
url: ${{ steps.deployment.outputs.page_url }}
60+
runs-on: ubuntu-latest
61+
needs: build
62+
steps:
63+
- name: Deploy to GitHub Pages
64+
id: deployment
65+
uses: actions/deploy-pages@v4

.github/workflows/test-node.yml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: Test Node.js Website
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
paths:
8+
- 'website_node/**'
9+
push:
10+
branches:
11+
- main
12+
paths:
13+
- 'website_node/**'
14+
15+
jobs:
16+
test:
17+
runs-on: ubuntu-latest
18+
19+
strategy:
20+
matrix:
21+
node-version: [18, 20]
22+
23+
steps:
24+
- name: Checkout repository
25+
uses: actions/checkout@v4
26+
27+
- name: Setup Node.js ${{ matrix.node-version }}
28+
uses: actions/setup-node@v4
29+
with:
30+
node-version: ${{ matrix.node-version }}
31+
cache: 'npm'
32+
cache-dependency-path: website_node/package-lock.json
33+
34+
- name: Install dependencies
35+
working-directory: ./website_node
36+
run: npm ci
37+
38+
- name: Copy assets
39+
working-directory: ./website_node
40+
run: npm run build
41+
42+
- name: Check if server starts
43+
working-directory: ./website_node
44+
run: |
45+
timeout 10 node server.js &
46+
SERVER_PID=$!
47+
sleep 5
48+
49+
# Check if server is running
50+
if curl -f http://localhost:3000 > /dev/null 2>&1; then
51+
echo "✅ Server started successfully"
52+
kill $SERVER_PID
53+
exit 0
54+
else
55+
echo "❌ Server failed to start"
56+
kill $SERVER_PID || true
57+
exit 1
58+
fi
59+
60+
- name: Lint check (if you add linting later)
61+
working-directory: ./website_node
62+
run: echo "No linting configured yet"
63+
continue-on-error: true

README.md

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

website_node/.dockerignore

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
node_modules
2+
npm-debug.log
3+
.env
4+
.env.local
5+
.git
6+
.gitignore
7+
README.md
8+
.vscode
9+
.idea
10+
*.md
11+
.DS_Store
12+
Thumbs.db
13+
logs
14+
*.log
15+
.cache
16+
dist

website_node/.env.example

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Server configuration
2+
PORT=3000
3+
NODE_ENV=development
4+
5+
# Add any other environment variables here

website_node/.gitignore

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Dependencies
2+
node_modules/
3+
package-lock.json
4+
yarn.lock
5+
6+
# Environment variables
7+
.env
8+
.env.local
9+
.env.production
10+
11+
# Logs
12+
logs/
13+
*.log
14+
npm-debug.log*
15+
yarn-debug.log*
16+
yarn-error.log*
17+
18+
# OS files
19+
.DS_Store
20+
Thumbs.db
21+
22+
# IDE
23+
.vscode/
24+
.idea/
25+
*.swp
26+
*.swo
27+
*~
28+
29+
# Build output
30+
dist/
31+
build/
32+
33+
# Temporary files
34+
*.tmp
35+
.cache/

0 commit comments

Comments
 (0)