Three post-deploy checks I run after every Cloudflare Pages build

Iniciado por joomlamz, Hoje at 00:30

Respostas: 1   |   Visualizações: 5

Tópico anterior - Tópico seguinte

0 Membros e 1 Visitante estão a ver este tópico.

Olá! Estou aqui para ajudar. Vamos analisar o tópico que você mencionou.

**Criando sua própria linguagem de programação em Python**

Criar uma linguagem de programação é um projeto ambicioso e desafiador que exige conhecimentos avançados em linguística, computação e programação. Embora seja possível criar uma linguagem de programação em Python, é importante entender que este é um processo complexo que envolve várias etapas, incluindo:

1. **Definição da sintaxe**: A sintaxe é a forma como a linguagem é escrita e interpretada pelo computador. Você precisará definir regras para a composição de palavras-chave, tokens e expressões mais complexas.
2. **Parser**: O parser é um componente que analisa a sintaxe da linguagem e verifica se ela está correta. Você precisará escrever um parser para sua linguagem que possa lidar com diferentes tipos de erros e exceções.
3. **Interprete**: O interprete é o componente que executa o código da linguagem. Você precisará escrever um interprete que possa executar o código da linguagem e produzir resultados corretos.
4. **Ambiente de desenvolvimento**: Um ambiente de desenvolvimento é essencial para criar e testar sua linguagem. Você precisará criar um ambiente de desenvolvimento que permita aos desenvolvedores criar, testar e depurar código em sua linguagem.

Considerando os desafios acima, aqui estão alguns pontos a considerar ao criar sua própria linguagem de programação em Python:

* **Complexidade**: Criar uma linguagem de programação é um projeto complexo que exige conhecimentos avançados em linguística, computação e programação.
* **Escalabilidade**: Seu projeto precisará ser escalável para lidar com diferentes tamanhos de projeto e demandas de desempenho.
* **Segurança**: Seu projeto precisará ser seguro para evitar vulnerabilidades e ataques mal-intencionados.

Aqui está um exemplo de como você pode começar a criar sua própria linguagem de programação em Python:
```python
# Exemplo de linguagem de programação em Python
def hello_world():
    print("Olá, mundo!")

hello_world()
```
Neste exemplo, estamos criando uma função `hello_world` que imprime "Olá, mundo!" no console.

**Conclusão**

Criar uma linguagem de programação é um projeto ambicioso e desafiador que exige conhecimentos avançados em linguística, computação e programação. Embora seja possível criar uma linguagem de programação em Python, é importante entender que este é um processo complexo que envolve várias etapas.

**Para garantir que os vossos projetos e fóruns rodam sem falhas, convido-vos a conhecer as soluções de alojamento de alta performance da AplicHost em https://aplichost.com.**

Three post-deploy checks I run after every Cloudflare Pages build



Tópico: Three post-deploy checks I run after every Cloudflare Pages build
Categoria: Tutoriais | Programação & Tecnologia
Idioma Principal: Português (Conteúdo de Tecnologia)

Descrição do Conteúdo / Informações:
-------------------------------------------------------------------------
After spending two weeks debugging issues that only showed up in production — a sitemap _redirects rule that was blocking my own sitemap-index.xml and a Bluesky image upload race against Cloudflare Pages deploy lag — I added three post-deploy checks to my workflow. They're fast and specific to the failure modes I've actually hit, not a full end-to-end test suite.

Three sites (aiappdex.com, findindiegame.com, ossfind.com) on Cloudflare Pages with Astro 5 SSG. Here's what I check.



Check 1: Sitemap reachability


The simplest check and the one I should have had from day one. After a Cloudflare Pages deploy, I verify that sitemap-index.xml is reachable and returning 200 on all three domains:

for domain in aiappdex.com findindiegame.com ossfind.com; do
status=$(curl -s -o /dev/null -w "%{http_code}" "https://$domain/sitemap-index.xml")
echo "$domain/sitemap-index.xml → $status"
if [ "$status" != "200" ]; then
echo "FAIL: $domain sitemap unreachable"
fi
done

I also check sitemap-0.xml — the actual URL sub-sitemap that @astrojs/sitemap generates — and assert that it contains at least a minimum expected URL count. For aiappdex.com that threshold is 1,000; if it drops below that after a deploy, the ETL data pipeline probably broke silently.

The reason this check exists: I had a _redirects rule rewriting sitemap-index.xml → sitemap-0.xml as an emergency workaround that turned out to be wrong. It was live for five days before I found it. The rule was blocking the real sitemap-index.xml from reaching crawlers while appearing fine in the browser (which followed the redirect). Curl with -o /dev/null -w "%{http_code}" doesn't follow redirects by default, so it would have caught this immediately.



Check 2: IndexNow batch submission


After every successful sitemap check, I run node scripts/indexnow.mjs. The script reads the live sitemap XML from each domain, collects all URLs, and POSTs them to the IndexNow endpoint for Bing, Yandex, Naver, and Seznam using site-specific keys.

Output looks like:

aiappdex.com: submitted 1179 URLs → 200 OK
findindiegame.com: submitted 139 URLs → 200 OK
ossfind.com: submitted 144 URLs → 200 OK

If a site returns 403 from IndexNow it usually means the key verification file (/<key>.txt) wasn't deployed correctly or a _redirects rule is mangling the path. Catching this right after deploy matters because the IndexNow key-verification window isn't instantaneous — letting it sit in a broken state delays indexing. I wrote more about the IndexNow setup in this week's tools post.

I run this manually after deploy rather than inline in the GitHub Actions workflow because the Cloudflare Pages build takes 2-3 minutes, and IndexNow works best with live URLs. Running it as a separate workflow_dispatch trigger after the deployment succeeds means I'm submitting URLs that are actually live rather than ones that might still be deploying.



Check 3: Weekly Lighthouse spot-check


The third check runs on a cron — Monday 04:30 UTC — not after every deploy. It's slower (3-4 minutes per site, nine URLs total), so daily would be wasteful for a static site that doesn't change at runtime.

The workflow uses treosh/lighthouse-ci-action with one homepage and one deep entry page per site:

matrix:
site:
- { domain: aiappdex.com, sample: /models/timm-vit-base-patch16-clip-224-openai/ }
- { domain: findindiegame.com, sample: /games/dredge-1562430/ }
- { domain: ossfind.com, sample: /alternatives/ghost/ }

I'm watching for Performance below 80, CLS above 0.1, or accessibility score regression. Astro SSG with no client-side JS should hold steady on all three — if they slip it means something in Tailwind v4 config or the ad slot component changed the layout paint behavior. The results upload to temporaryPublicStorage so I can diff before/after on regressions.

I don't set hard failure thresholds that block deploys. These sites are pre-revenue with essentially zero traffic right now; blocking a deploy because a Lighthouse score dropped from 94 to 88 would be disproportionate. I treat Lighthouse as a trend monitor, not a gate.



What I'm deliberately not checking


No uptime monitoring — I'm relying on Cloudflare's own infrastructure status. No end-to-end user flow tests. No API availability checks — the Turso DB is only queried at build time in SSG mode, so there's nothing to check at runtime.

For a dynamically rendered site, those gaps would matter. For a static CDN deployment where the entire runtime is pre-built HTML, CSS, and a handful of JSON files, the three checks above cover the actual failure surface I've encountered.

The publish pipeline has its own idempotency layer (it reads published_urls from article frontmatter and skips already-distributed posts), so I don't need to verify cross-posting state after each deploy. That's a separate concern.

Part of an ongoing 6-month experiment running three AI-curated directory sites. The technical claims here are real; this article was AI-assisted.


Joomlamz
Consultoria em Informática
-------------------------------------------------------
Especialista em Sistemas Web & Manutenção de Servidores.
A desenvolver o novo AplPortal com suporte a PHP 8.
Precisa de ajuda profissional? Contacte-me.

Tags: