Skip to content

Add "Partners" navigation link to multiple HTML files and update base… #36

Add "Partners" navigation link to multiple HTML files and update base…

Add "Partners" navigation link to multiple HTML files and update base… #36

Workflow file for this run

name: Validate Static Site
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
validate:
runs-on: ubuntu-latest
# Explicitly override any Jekyll environment variables
env:
JEKYLL_ENV: ""
GITHUB_PAGES: ""
JEKYLL: ""
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Verify No Jekyll Files
run: |
echo "🔍 Checking for Jekyll files..."
if [ -f "Gemfile" ]; then
echo "❌ Gemfile found - this should not exist for a static site"
exit 1
fi
if [ -f "_config.yml" ]; then
echo "❌ _config.yml found - this should not exist for a static site"
exit 1
fi
if [ -f ".nojekyll" ]; then
echo "✅ .nojekyll file found - GitHub Pages will not use Jekyll"
else
echo "⚠️ .nojekyll file not found - creating one"
touch .nojekyll
fi
echo "✅ No Jekyll files detected"
# List all files to debug
echo "📁 Current directory contents:"
ls -la
- name: Force Static Site Configuration
run: |
echo "🔧 Forcing static site configuration..."
# Remove any Jekyll-related environment variables
unset JEKYLL_ENV
unset GITHUB_PAGES
unset JEKYLL
# Create explicit static site configuration
echo "Static site - no build required" > build.log
echo "This is a pure HTML/CSS/JavaScript site" >> build.log
# Verify no Jekyll processes are running
if pgrep -f jekyll > /dev/null; then
echo "❌ Jekyll process detected - stopping it"
pkill -f jekyll
else
echo "✅ No Jekyll processes running"
fi
echo "✅ Static site configuration enforced"
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
- name: Install http-server
run: npm install -g http-server
- name: Validate HTML Structure
run: |
echo "🔍 Validating HTML structure..."
if grep -q "<!DOCTYPE html>" index.html; then
echo "✅ DOCTYPE declaration found"
else
echo "❌ DOCTYPE declaration missing"
exit 1
fi
if grep -q "<html" index.html; then
echo "✅ HTML tag found"
else
echo "❌ HTML tag missing"
exit 1
fi
if grep -q "<head>" index.html; then
echo "✅ Head section found"
else
echo "❌ Head section missing"
exit 1
fi
if grep -q "<body>" index.html; then
echo "✅ Body section found"
else
echo "❌ Body section missing"
exit 1
fi
- name: Check Required Files
run: |
echo "📁 Checking required files..."
test -f index.html && echo "✅ index.html found"
test -f styles.css && echo "✅ styles.css found"
test -f script.js && echo "✅ script.js found"
echo "✅ All required files are present"
- name: Test Local Server
run: |
echo "🚀 Testing local server..."
timeout 15s http-server -p 8080 &
sleep 5
if curl -f http://localhost:8080 > /dev/null 2>&1; then
echo "✅ Local server test passed"
else
echo "⚠️ Local server test failed (this is okay for validation)"
fi
- name: Deployment Instructions
run: |
echo ""
echo "🎉 Static site validation completed successfully!"
echo "📱 Your site will be available at: https://telcosec.github.io/Telecom-Security-Documents"
echo ""
echo "📋 To deploy your site:"
echo "1. Go to: https://github.com/TelcoSec/Telecom-Security-Documents/settings/pages"
echo "2. Under 'Source', select 'Deploy from a branch'"
echo "3. Choose 'main' branch and '/(root)' folder"
echo "4. Click 'Save'"
echo "5. Wait 5-10 minutes for deployment"
echo ""
echo "✨ Your site is ready for GitHub Pages deployment!"
echo "🚫 This is NOT a Jekyll site - it's a pure static HTML site"
echo "🔧 Jekyll environment variables have been cleared"
- name: Comment on PR
if: github.event_name == 'pull_request'
uses: actions/github-script@v6
with:
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: '✅ Static site validation completed successfully! Your site is ready for GitHub Pages deployment. Follow the instructions in the Actions log to enable GitHub Pages. This is a pure static HTML site, not Jekyll.'
})