Skip to content

fix(site): breathing room for service section #20

fix(site): breathing room for service section

fix(site): breathing room for service section #20

Workflow file for this run

name: Site
on:
push:
branches:
- main
paths:
- 'site/**'
- '.github/workflows/site.yml'
pull_request:
paths:
- 'site/**'
- '.github/workflows/site.yml'
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
concurrency:
group: egeo-site-production
cancel-in-progress: false
defaults:
run:
working-directory: site
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
cache-dependency-path: site/package-lock.json
- run: npm ci
- run: npm run build
- run: ./verify.sh
- name: Deploy to Cloudflare Pages
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
working-directory: .
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
run: >-
npx wrangler pages deploy site/dist
--project-name egeoagents
--branch main
--commit-hash "${GITHUB_SHA}"
--commit-message "${GITHUB_SHA}"
- name: Verify served production revision
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
working-directory: .
env:
SITE_URL: https://egeoagents.com
run: |
set -euo pipefail
expected="$(sha256sum site/dist/index.html | awk '{print $1}')"
matched=0
for attempt in $(seq 1 12); do
actual="$(curl --fail --silent --show-error --location "$SITE_URL/" | sha256sum | awk '{print $1}')"
if [ "$actual" = "$expected" ]; then
matched=1
break
fi
sleep 5
done
test "$matched" = 1
test "$(curl --silent --show-error --location --output /dev/null --write-out '%{http_code}' "$SITE_URL/robots.txt")" = 200
test "$(curl --silent --show-error --location --output /dev/null --write-out '%{http_code}' "$SITE_URL/sitemap-index.xml")" = 200
test "$(curl --silent --show-error --location --output /dev/null --write-out '%{http_code}' "$SITE_URL/__egeo_missing_route_probe__")" = 404
- name: Notify IndexNow
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
working-directory: .
run: bash site/indexnow.sh