Skip to content

Commit 10269e8

Browse files
committed
feat: initialize CodeX redirect with Vite setup
- Add package.json for project configuration and dependencies - Create main.js for immediate redirect to CodeX website with fallback content - Add style.css for basic styling and responsive design - Configure Vite with base path for GitHub Pages deployment and build settings
0 parents  commit 10269e8

File tree

11 files changed

+1407
-0
lines changed

11 files changed

+1407
-0
lines changed

.github/copilot-instructions.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Project: Vite Static Redirect Website
2+
3+
This project is a static Vite website that redirects users to codexsit.github.io.
4+
5+
## Progress Tracking
6+
7+
- [x] Verify that the copilot-instructions.md file in the .github directory is created
8+
- [x] Clarify Project Requirements - Creating a static Vite website that redirects to codexsit.github.io
9+
- [x] Scaffold the Project
10+
- [x] Customize the Project
11+
- [x] Install Required Extensions
12+
- [x] Compile the Project
13+
- [x] Create and Run Task
14+
- [x] Launch the Project
15+
- [x] Ensure Documentation is Complete

.github/workflows/ci.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: CI
2+
3+
on:
4+
# Run on pull requests
5+
pull_request:
6+
branches: ["main"]
7+
8+
# Run on pushes to branches other than main
9+
push:
10+
branches-ignore: ["main"]
11+
12+
jobs:
13+
# Build and test job
14+
build:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v4
19+
20+
- name: Set up Node.js
21+
uses: actions/setup-node@v4
22+
with:
23+
node-version: "20"
24+
cache: "npm"
25+
26+
- name: Install dependencies
27+
run: npm ci
28+
29+
- name: Build
30+
run: npm run build
31+
32+
- name: Check build output
33+
run: |
34+
if [ ! -d "dist" ]; then
35+
echo "Build failed: dist directory not found"
36+
exit 1
37+
fi
38+
if [ ! -f "dist/index.html" ]; then
39+
echo "Build failed: index.html not found in dist"
40+
exit 1
41+
fi
42+
echo "Build successful!"
43+
44+
- name: Upload build artifacts
45+
uses: actions/upload-artifact@v4
46+
with:
47+
name: build-files
48+
path: dist/
49+
retention-days: 5

.github/workflows/deploy.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
push:
5+
branches: [main]
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
concurrency:
14+
group: pages
15+
cancel-in-progress: false
16+
17+
jobs:
18+
build:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@v4
23+
24+
- name: Setup Node
25+
uses: actions/setup-node@v4
26+
with:
27+
node-version: 20
28+
cache: npm
29+
30+
- name: Install dependencies
31+
run: npm ci
32+
33+
- name: Build
34+
run: npm run build
35+
36+
- name: Setup Pages
37+
uses: actions/configure-pages@v4
38+
39+
- name: Upload artifact
40+
uses: actions/upload-pages-artifact@v3
41+
with:
42+
path: ./dist
43+
44+
deploy:
45+
needs: build
46+
runs-on: ubuntu-latest
47+
environment:
48+
name: github-pages
49+
url: ${{ steps.deployment.outputs.page_url }}
50+
steps:
51+
- name: Deploy to GitHub Pages
52+
id: deployment
53+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
pnpm-debug.log*
8+
lerna-debug.log*
9+
10+
node_modules
11+
dist
12+
dist-ssr
13+
*.local
14+
15+
# Editor directories and files
16+
.vscode/*
17+
!.vscode/extensions.json
18+
.idea
19+
.DS_Store
20+
*.suo
21+
*.ntvs*
22+
*.njsproj
23+
*.sln
24+
*.sw?

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# CodeX Website Redirect
2+
3+
A static Vite website that redirects users to [codexsit.github.io](https://codexsit.github.io).

index.html

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7+
<meta http-equiv="refresh" content="0; url=https://codexsit.github.io" />
8+
<title>Redirecting to CodeX...</title>
9+
</head>
10+
<body>
11+
<div id="app"></div>
12+
<script type="module" src="/src/main.js"></script>
13+
</body>
14+
</html>

0 commit comments

Comments
 (0)