Skip to content

Commit 905364d

Browse files
author
Your Name
committed
z
1 parent 8aa655a commit 905364d

File tree

2 files changed

+169
-0
lines changed

2 files changed

+169
-0
lines changed

.github/workflows/deploy.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@ jobs:
1010
validate:
1111
runs-on: ubuntu-latest
1212

13+
# Explicitly override any Jekyll environment variables
14+
env:
15+
JEKYLL_ENV: ""
16+
GITHUB_PAGES: ""
17+
JEKYLL: ""
18+
1319
steps:
1420
- name: Checkout
1521
uses: actions/checkout@v3
@@ -32,6 +38,33 @@ jobs:
3238
touch .nojekyll
3339
fi
3440
echo "✅ No Jekyll files detected"
41+
42+
# List all files to debug
43+
echo "📁 Current directory contents:"
44+
ls -la
45+
46+
- name: Force Static Site Configuration
47+
run: |
48+
echo "🔧 Forcing static site configuration..."
49+
50+
# Remove any Jekyll-related environment variables
51+
unset JEKYLL_ENV
52+
unset GITHUB_PAGES
53+
unset JEKYLL
54+
55+
# Create explicit static site configuration
56+
echo "Static site - no build required" > build.log
57+
echo "This is a pure HTML/CSS/JavaScript site" >> build.log
58+
59+
# Verify no Jekyll processes are running
60+
if pgrep -f jekyll > /dev/null; then
61+
echo "❌ Jekyll process detected - stopping it"
62+
pkill -f jekyll
63+
else
64+
echo "✅ No Jekyll processes running"
65+
fi
66+
67+
echo "✅ Static site configuration enforced"
3568
3669
- name: Setup Node.js
3770
uses: actions/setup-node@v3
@@ -106,6 +139,7 @@ jobs:
106139
echo ""
107140
echo "✨ Your site is ready for GitHub Pages deployment!"
108141
echo "🚫 This is NOT a Jekyll site - it's a pure static HTML site"
142+
echo "🔧 Jekyll environment variables have been cleared"
109143
110144
- name: Comment on PR
111145
if: github.event_name == 'pull_request'

.github/workflows/static-site.yml

Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
name: Deploy Static Site
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
deploy:
11+
runs-on: ubuntu-latest
12+
13+
# Explicitly override any Jekyll environment variables
14+
env:
15+
JEKYLL_ENV: ""
16+
GITHUB_PAGES: ""
17+
JEKYLL: ""
18+
BUNDLE_GEMFILE: ""
19+
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@v3
23+
24+
- name: Force Static Site Mode
25+
run: |
26+
echo "🚫 FORCING STATIC SITE MODE - NO JEKYLL ALLOWED"
27+
28+
# Clear all Jekyll-related environment variables
29+
unset JEKYLL_ENV
30+
unset GITHUB_PAGES
31+
unset JEKYLL
32+
unset BUNDLE_GEMFILE
33+
34+
# Create explicit static site markers
35+
echo "STATIC_SITE=true" > .static-site
36+
echo "NO_JEKYLL=true" >> .static-site
37+
echo "BUILD_TYPE=static" >> .static-site
38+
39+
# Remove any Jekyll-related files if they exist
40+
rm -f Gemfile Gemfile.lock _config.yml
41+
42+
# Ensure .nojekyll exists
43+
touch .nojekyll
44+
45+
echo "✅ Static site mode enforced"
46+
47+
- name: Validate Static Files
48+
run: |
49+
echo "🔍 Validating static site files..."
50+
51+
# Check for required files
52+
required_files=("index.html" "styles.css" "script.js")
53+
for file in "${required_files[@]}"; do
54+
if [ -f "$file" ]; then
55+
echo "✅ $file found"
56+
else
57+
echo "❌ $file missing"
58+
exit 1
59+
fi
60+
done
61+
62+
# Verify no Jekyll files
63+
jekyll_files=("Gemfile" "_config.yml" "_posts" "_layouts" "_includes")
64+
for file in "${jekyll_files[@]}"; do
65+
if [ -f "$file" ] || [ -d "$file" ]; then
66+
echo "❌ Jekyll file/directory found: $file"
67+
exit 1
68+
fi
69+
done
70+
71+
echo "✅ All static site validations passed"
72+
73+
- name: Test Site
74+
run: |
75+
echo "🚀 Testing static site..."
76+
77+
# Simple HTML validation
78+
if grep -q "<!DOCTYPE html>" index.html; then
79+
echo "✅ DOCTYPE found"
80+
else
81+
echo "❌ DOCTYPE missing"
82+
exit 1
83+
fi
84+
85+
if grep -q "<html" index.html; then
86+
echo "✅ HTML tag found"
87+
else
88+
echo "❌ HTML tag missing"
89+
exit 1
90+
fi
91+
92+
echo "✅ Static site validation completed"
93+
94+
- name: Prepare for Deployment
95+
run: |
96+
echo "📦 Preparing static site for deployment..."
97+
98+
# Create deployment manifest
99+
cat > deployment-info.txt << EOF
100+
STATIC SITE DEPLOYMENT
101+
======================
102+
Site Type: Pure HTML/CSS/JavaScript
103+
Build Required: NO
104+
Jekyll Required: NO
105+
Ruby Required: NO
106+
107+
Files:
108+
- index.html (main page)
109+
- styles.css (styling)
110+
- script.js (interactivity)
111+
- .nojekyll (prevents Jekyll processing)
112+
113+
Deployment URL: https://telcosec.github.io/Telecom-Security-Documents
114+
EOF
115+
116+
echo "✅ Deployment preparation completed"
117+
118+
- name: Success Message
119+
run: |
120+
echo ""
121+
echo "🎉 STATIC SITE READY FOR DEPLOYMENT!"
122+
echo "====================================="
123+
echo ""
124+
echo "📱 Your site will be available at:"
125+
echo " https://telcosec.github.io/Telecom-Security-Documents"
126+
echo ""
127+
echo "📋 To deploy:"
128+
echo "1. Go to repository Settings > Pages"
129+
echo "2. Select 'Deploy from a branch'"
130+
echo "3. Choose 'main' branch and '/(root)' folder"
131+
echo "4. Click 'Save'"
132+
echo "5. Wait 5-10 minutes"
133+
echo ""
134+
echo "✨ This is a pure static site - no build process needed!"
135+
echo "🚫 Jekyll has been completely disabled"

0 commit comments

Comments
 (0)