Skip to content

Commit 0db17fe

Browse files
committed
Moved site files from 'sitetest0' to main page
1 parent 4f9a492 commit 0db17fe

File tree

287 files changed

+85560
-0
lines changed

Some content is hidden

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

287 files changed

+85560
-0
lines changed

.github/workflows/deploy.yml

Lines changed: 173 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,173 @@
1+
name: Build and Deploy
2+
3+
# Run on push to main/master branch
4+
on:
5+
push:
6+
branches:
7+
- main
8+
- master
9+
workflow_dispatch: # Allow manual triggering
10+
11+
# Grant necessary permissions
12+
permissions:
13+
contents: write
14+
pages: write
15+
id-token: write
16+
issues: write
17+
pull-requests: write
18+
19+
# Ensure only one deployment runs at a time
20+
concurrency:
21+
group: "pages"
22+
cancel-in-progress: false
23+
24+
jobs:
25+
# Job 1: Build with Vite
26+
build:
27+
name: Build with Vite
28+
needs: []
29+
runs-on: ubuntu-latest
30+
outputs:
31+
build_status: ${{ steps.build_check.outputs.status }}
32+
33+
steps:
34+
- name: Checkout code
35+
uses: actions/checkout@v4
36+
with:
37+
ref: ${{ github.ref_name }}
38+
fetch-depth: 0
39+
40+
- name: Setup Node.js
41+
uses: actions/setup-node@v4
42+
with:
43+
node-version: '20'
44+
cache: 'npm'
45+
46+
- name: Install dependencies
47+
run: |
48+
echo "📦 Installing dependencies..."
49+
npm ci
50+
51+
- name: Build with Vite
52+
id: build_check
53+
run: |
54+
echo "🏗️ Building with Vite..."
55+
npm run build
56+
57+
# Check if build succeeded
58+
if [ ! -d "dist" ]; then
59+
echo "❌ Build failed - dist directory not created!"
60+
echo "status=failed" >> $GITHUB_OUTPUT
61+
exit 1
62+
fi
63+
64+
# Verify critical files exist
65+
if [ ! -f "dist/index.html" ]; then
66+
echo "❌ Build failed - index.html not found in dist!"
67+
echo "status=failed" >> $GITHUB_OUTPUT
68+
exit 1
69+
fi
70+
71+
echo "✅ Vite build completed successfully"
72+
echo "📦 Build output:"
73+
ls -lh dist/
74+
echo ""
75+
echo "📦 Assets:"
76+
ls -lh dist/assets/ | head -20
77+
echo "status=success" >> $GITHUB_OUTPUT
78+
79+
- name: Copy additional files to dist
80+
run: |
81+
echo "📋 Copying additional files..."
82+
# Copy files that Vite doesn't process but are needed
83+
cp -r vendor dist/ 2>/dev/null || echo "No vendor directory to copy"
84+
cp -r fonts dist/ 2>/dev/null || echo "No fonts directory to copy"
85+
cp -r PolliLibJS dist/ 2>/dev/null || echo "No PolliLibJS directory to copy"
86+
cp robots.txt dist/ 2>/dev/null || echo "No robots.txt to copy"
87+
cp sitemap.xml dist/ 2>/dev/null || echo "No sitemap.xml to copy"
88+
cp BingSiteAuth.xml dist/ 2>/dev/null || echo "No BingSiteAuth.xml to copy"
89+
cp visitor-tracking.js dist/ 2>/dev/null || echo "No visitor-tracking.js to copy"
90+
91+
# Copy page-specific JS files
92+
cp about/about.js dist/about/ 2>/dev/null || echo "No about.js to copy"
93+
cp ai/demo/age-verification.js dist/ai/demo/ 2>/dev/null || echo "No age-verification.js to copy"
94+
cp ai/demo/js/main.js dist/ai/demo/js/ 2>/dev/null || mkdir -p dist/ai/demo/js && cp ai/demo/js/main.js dist/ai/demo/js/ || echo "No main.js to copy"
95+
96+
echo "✅ Additional files copied"
97+
98+
- name: Upload artifact for deployment
99+
uses: actions/upload-pages-artifact@v3
100+
with:
101+
path: 'dist'
102+
103+
# Job 4a: Report Build Status
104+
report-status:
105+
name: Report Build Status
106+
needs: build
107+
runs-on: ubuntu-latest
108+
if: always()
109+
110+
steps:
111+
- name: Report success
112+
if: needs.build.outputs.build_status == 'success'
113+
run: |
114+
echo "✅ BUILD SUCCESSFUL"
115+
echo "================================"
116+
echo "Built with: Vite"
117+
echo "Status: SUCCESS"
118+
echo "Ready for deployment"
119+
echo "================================"
120+
121+
- name: Report failure
122+
if: needs.build.outputs.build_status == 'failed'
123+
run: |
124+
echo "❌ BUILD FAILED"
125+
echo "================================"
126+
echo "Built with: Vite"
127+
echo "Status: FAILED"
128+
echo "Check build logs for details"
129+
echo "================================"
130+
exit 1
131+
132+
- name: Create status comment (if PR)
133+
if: github.event_name == 'pull_request'
134+
uses: actions/github-script@v7
135+
with:
136+
script: |
137+
const status = '${{ needs.build.outputs.build_status }}';
138+
const icon = status === 'success' ? '✅' : '❌';
139+
const message = status === 'success' ? 'Build successful!' : 'Build failed!';
140+
141+
github.rest.issues.createComment({
142+
issue_number: context.issue.number,
143+
owner: context.repo.owner,
144+
repo: context.repo.repo,
145+
body: `${icon} **${message}**\n\n**Built with:** Vite\n**Status:** ${status.toUpperCase()}`
146+
});
147+
148+
# Job 4b: Deploy to GitHub Pages
149+
deploy:
150+
name: Deploy to GitHub Pages
151+
needs: build
152+
runs-on: ubuntu-latest
153+
if: needs.build.outputs.build_status == 'success'
154+
155+
environment:
156+
name: github-pages
157+
url: ${{ steps.deployment.outputs.page_url }}
158+
159+
steps:
160+
- name: Deploy to GitHub Pages
161+
id: deployment
162+
uses: actions/deploy-pages@v4
163+
164+
- name: Report deployment success
165+
run: |
166+
echo "🚀 DEPLOYMENT SUCCESSFUL"
167+
echo "================================"
168+
echo "URL: ${{ steps.deployment.outputs.page_url }}"
169+
echo "Built with: Vite (optimized)"
170+
echo "================================"
171+
echo ""
172+
echo "✨ Your site is now live with the latest updates!"
173+
echo "📦 Bundled, minified, and optimized for production"

.gitignore

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
PolliLibPy/__pycache__/
2+
3+
# Dependencies
4+
node_modules/
5+
6+
# Build output
7+
dist/
8+
9+
# Test results
10+
test-output*.txt
11+
test-output.log
12+
standalone-test-results.log
13+
*.log

BingSiteAuth.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?xml version="1.0"?>
2+
<users>
3+
<user>9B2A49B90F59DECF67920E1086249586</user>
4+
</users>

0 commit comments

Comments
 (0)