Skip to content

org-root: robots.txt + apex redirect for sitemap discovery #1

org-root: robots.txt + apex redirect for sitemap discovery

org-root: robots.txt + apex redirect for sitemap discovery #1

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: read
jobs:
validate:
name: Validate static files
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Validate robots.txt
run: |
# robots.txt must exist and contain a Sitemap directive
test -f robots.txt
grep -q '^Sitemap:' robots.txt
grep -q 'User-agent:' robots.txt
echo "robots.txt OK"
- name: Validate index.html
run: |
test -f index.html
grep -q 'godon-documentation' index.html
echo "index.html OK"
- name: Check no accidental content
run: |
# This repo should only contain robots.txt, index.html, README.md, .github/
ALLOWED="robots.txt index.html README.md"
FOUND=$(find . -maxdepth 1 -type f ! -name '.gitignore' | sed 's|^\./||' | sort)
UNEXPECTED=$(comm -23 <(echo "$FOUND") <(echo "$ALLOWED" | tr ' ' '\n' | sort))
if [ -n "$UNEXPECTED" ]; then
echo "Unexpected files at root: $UNEXPECTED"
exit 1
fi
echo "File structure OK"