chore: remove explicit email and phone inline blocks in favor of automatic obfuscation
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 14s
Build & Deploy / 🧪 QA (push) Successful in 3m46s
Build & Deploy / 🏗️ Build (push) Successful in 3m58s
Build & Deploy / 🚀 Deploy (push) Successful in 15s
Build & Deploy / 🔔 Notify (push) Has been cancelled
Build & Deploy / 🧪 Post-Deploy Verification (push) Has been cancelled

This commit is contained in:
2026-03-02 12:39:07 +01:00
parent 1e0886144f
commit 4faed38f47
6 changed files with 59 additions and 117 deletions

View File

@@ -11,10 +11,10 @@ env:
jobs: jobs:
# ──────────────────────────────────────────────────── # ────────────────────────────────────────────────────
# 1. Install & Cache Dependencies # 1. Static Checks (HTML, Assets, HTTP)
# ──────────────────────────────────────────────────── # ────────────────────────────────────────────────────
install: static:
name: 📦 Install name: 🔍 Static Analysis
runs-on: docker runs-on: docker
container: container:
image: catthehacker/ubuntu:act-latest image: catthehacker/ubuntu:act-latest
@@ -30,39 +30,17 @@ jobs:
run: | run: |
echo "@mintel:registry=https://git.infra.mintel.me/api/packages/mmintel/npm" > .npmrc echo "@mintel:registry=https://git.infra.mintel.me/api/packages/mmintel/npm" > .npmrc
echo "//git.infra.mintel.me/api/packages/mmintel/npm/:_authToken=${{ secrets.NPM_TOKEN }}" >> .npmrc echo "//git.infra.mintel.me/api/packages/mmintel/npm/:_authToken=${{ secrets.NPM_TOKEN }}" >> .npmrc
- name: 📦 Cache node_modules
uses: actions/cache@v4
id: cache-deps
with:
path: node_modules
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}
- name: Install - name: Install
if: steps.cache-deps.outputs.cache-hit != 'true'
run: | run: |
pnpm store prune pnpm store prune
pnpm install --no-frozen-lockfile pnpm install --no-frozen-lockfile
- name: Upload workspace
uses: actions/upload-artifact@v4
with:
name: workspace
path: |
node_modules
.npmrc
retention-days: 1
# ────────────────────────────────────────────────────
# 2. Static Checks (HTML, Assets, HTTP)
# ────────────────────────────────────────────────────
static:
name: 🔍 Static Analysis
needs: install
runs-on: docker
container:
image: catthehacker/ubuntu:act-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
with:
version: 10
- uses: actions/setup-node@v4
with:
node-version: 20
- uses: actions/download-artifact@v4
with:
name: workspace
- name: 🌐 HTML Validation - name: 🌐 HTML Validation
env: env:
NEXT_PUBLIC_BASE_URL: ${{ env.TARGET_URL }} NEXT_PUBLIC_BASE_URL: ${{ env.TARGET_URL }}
@@ -80,11 +58,10 @@ jobs:
run: pnpm run check:http run: pnpm run check:http
# ──────────────────────────────────────────────────── # ────────────────────────────────────────────────────
# 3. Accessibility (WCAG) # 2. Accessibility (WCAG)
# ──────────────────────────────────────────────────── # ────────────────────────────────────────────────────
a11y: a11y:
name: ♿ Accessibility name: ♿ Accessibility
needs: install
runs-on: docker runs-on: docker
container: container:
image: catthehacker/ubuntu:act-latest image: catthehacker/ubuntu:act-latest
@@ -96,9 +73,21 @@ jobs:
- uses: actions/setup-node@v4 - uses: actions/setup-node@v4
with: with:
node-version: 20 node-version: 20
- uses: actions/download-artifact@v4 - name: 🔐 Registry Auth
run: |
echo "@mintel:registry=https://git.infra.mintel.me/api/packages/mmintel/npm" > .npmrc
echo "//git.infra.mintel.me/api/packages/mmintel/npm/:_authToken=${{ secrets.NPM_TOKEN }}" >> .npmrc
- name: 📦 Cache node_modules
uses: actions/cache@v4
id: cache-deps
with: with:
name: workspace path: node_modules
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}
- name: Install
if: steps.cache-deps.outputs.cache-hit != 'true'
run: |
pnpm store prune
pnpm install --no-frozen-lockfile
- name: 🔍 Install Chromium - name: 🔍 Install Chromium
run: | run: |
apt-get update && apt-get install -y gnupg wget ca-certificates apt-get update && apt-get install -y gnupg wget ca-certificates
@@ -117,11 +106,10 @@ jobs:
run: pnpm run check:wcag run: pnpm run check:wcag
# ──────────────────────────────────────────────────── # ────────────────────────────────────────────────────
# 4. Performance (Lighthouse) # 3. Performance (Lighthouse)
# ──────────────────────────────────────────────────── # ────────────────────────────────────────────────────
lighthouse: lighthouse:
name: 🎭 Lighthouse name: 🎭 Lighthouse
needs: install
runs-on: docker runs-on: docker
container: container:
image: catthehacker/ubuntu:act-latest image: catthehacker/ubuntu:act-latest
@@ -133,9 +121,21 @@ jobs:
- uses: actions/setup-node@v4 - uses: actions/setup-node@v4
with: with:
node-version: 20 node-version: 20
- uses: actions/download-artifact@v4 - name: 🔐 Registry Auth
run: |
echo "@mintel:registry=https://git.infra.mintel.me/api/packages/mmintel/npm" > .npmrc
echo "//git.infra.mintel.me/api/packages/mmintel/npm/:_authToken=${{ secrets.NPM_TOKEN }}" >> .npmrc
- name: 📦 Cache node_modules
uses: actions/cache@v4
id: cache-deps
with: with:
name: workspace path: node_modules
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}
- name: Install
if: steps.cache-deps.outputs.cache-hit != 'true'
run: |
pnpm store prune
pnpm install --no-frozen-lockfile
- name: 🔍 Install Chromium - name: 🔍 Install Chromium
run: | run: |
apt-get update && apt-get install -y gnupg wget ca-certificates apt-get update && apt-get install -y gnupg wget ca-certificates
@@ -158,11 +158,10 @@ jobs:
run: pnpm run pagespeed:test -- --collect.settings.preset=mobile run: pnpm run pagespeed:test -- --collect.settings.preset=mobile
# ──────────────────────────────────────────────────── # ────────────────────────────────────────────────────
# 5. Link Check & Dependency Audit # 4. Link Check & Dependency Audit
# ──────────────────────────────────────────────────── # ────────────────────────────────────────────────────
links: links:
name: 🔗 Links & Deps name: 🔗 Links & Deps
needs: install
runs-on: docker runs-on: docker
container: container:
image: catthehacker/ubuntu:act-latest image: catthehacker/ubuntu:act-latest
@@ -174,9 +173,21 @@ jobs:
- uses: actions/setup-node@v4 - uses: actions/setup-node@v4
with: with:
node-version: 20 node-version: 20
- uses: actions/download-artifact@v4 - name: 🔐 Registry Auth
run: |
echo "@mintel:registry=https://git.infra.mintel.me/api/packages/mmintel/npm" > .npmrc
echo "//git.infra.mintel.me/api/packages/mmintel/npm/:_authToken=${{ secrets.NPM_TOKEN }}" >> .npmrc
- name: 📦 Cache node_modules
uses: actions/cache@v4
id: cache-deps
with: with:
name: workspace path: node_modules
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}
- name: Install
if: steps.cache-deps.outputs.cache-hit != 'true'
run: |
pnpm store prune
pnpm install --no-frozen-lockfile
- name: 📦 Depcheck - name: 📦 Depcheck
continue-on-error: true continue-on-error: true
run: pnpm dlx depcheck --ignores="*eslint*,*typescript*,*tailwindcss*,*postcss*,*prettier*,*@types/*,*husky*,*lint-staged*,*@next/*,*@lhci/*,*commitlint*,*cspell*,*rimraf*,*@payloadcms/*,*start-server-and-test*,*html-validate*,*critters*,*dotenv*,*turbo*" run: pnpm dlx depcheck --ignores="*eslint*,*typescript*,*tailwindcss*,*postcss*,*prettier*,*@types/*,*husky*,*lint-staged*,*@next/*,*@lhci/*,*commitlint*,*cspell*,*rimraf*,*@payloadcms/*,*start-server-and-test*,*html-validate*,*critters*,*dotenv*,*turbo*"
@@ -187,11 +198,11 @@ jobs:
fail: true fail: true
# ──────────────────────────────────────────────────── # ────────────────────────────────────────────────────
# 6. Notification # 5. Notification
# ──────────────────────────────────────────────────── # ────────────────────────────────────────────────────
notify: notify:
name: 🔔 Notify name: 🔔 Notify
needs: [install, static, a11y, lighthouse, links] needs: [static, a11y, lighthouse, links]
if: always() if: always()
runs-on: docker runs-on: docker
container: container:
@@ -200,13 +211,12 @@ jobs:
- name: 🔔 Gotify - name: 🔔 Gotify
shell: bash shell: bash
run: | run: |
INSTALL="${{ needs.install.result }}"
STATIC="${{ needs.static.result }}" STATIC="${{ needs.static.result }}"
A11Y="${{ needs.a11y.result }}" A11Y="${{ needs.a11y.result }}"
LIGHTHOUSE="${{ needs.lighthouse.result }}" LIGHTHOUSE="${{ needs.lighthouse.result }}"
LINKS="${{ needs.links.result }}" LINKS="${{ needs.links.result }}"
if [[ "$INSTALL" != "success" || "$STATIC" != "success" || "$LIGHTHOUSE" != "success" ]]; then if [[ "$STATIC" != "success" || "$LIGHTHOUSE" != "success" ]]; then
PRIORITY=8 PRIORITY=8
EMOJI="🚨" EMOJI="🚨"
STATUS="Failed" STATUS="Failed"
@@ -217,7 +227,7 @@ jobs:
fi fi
TITLE="$EMOJI ${{ env.PROJECT_NAME }} QA $STATUS" TITLE="$EMOJI ${{ env.PROJECT_NAME }} QA $STATUS"
MESSAGE="Install: $INSTALL | Static: $STATIC | A11y: $A11Y | Lighthouse: $LIGHTHOUSE | Links: $LINKS MESSAGE="Static: $STATIC | A11y: $A11Y | Lighthouse: $LIGHTHOUSE | Links: $LINKS
${{ env.TARGET_URL }}" ${{ env.TARGET_URL }}"
curl -s -k -X POST "${{ secrets.GOTIFY_URL }}/message?token=${{ secrets.GOTIFY_TOKEN }}" \ curl -s -k -X POST "${{ secrets.GOTIFY_URL }}/message?token=${{ secrets.GOTIFY_TOKEN }}" \

View File

@@ -1111,14 +1111,6 @@ const jsxConverters: JSXConverters = {
<CTA data={node?.fields} /> <CTA data={node?.fields} />
</Reveal> </Reveal>
), ),
'block-email': ({ node }: any) => {
const { email, label } = node.fields;
return <ObfuscatedEmail email={email}>{label || email}</ObfuscatedEmail>;
},
'block-phone': ({ node }: any) => {
const { phone, label } = node.fields;
return <ObfuscatedPhone phone={phone}>{label || phone}</ObfuscatedPhone>;
},
}, },
// Custom converter for the Payload "upload" Lexical node (Media collection) // Custom converter for the Payload "upload" Lexical node (Media collection)
// This natively reconstructs Next.js <Image /> tags pointing to the focal-point cropped sizes // This natively reconstructs Next.js <Image /> tags pointing to the focal-point cropped sizes

View File

@@ -21,8 +21,6 @@ import { Posts } from './src/payload/collections/Posts';
import { FormSubmissions } from './src/payload/collections/FormSubmissions'; import { FormSubmissions } from './src/payload/collections/FormSubmissions';
import { Products } from './src/payload/collections/Products'; import { Products } from './src/payload/collections/Products';
import { Pages } from './src/payload/collections/Pages'; import { Pages } from './src/payload/collections/Pages';
import { Email } from './src/payload/blocks/Email';
import { Phone } from './src/payload/blocks/Phone';
import { seedDatabase } from './src/payload/seed'; import { seedDatabase } from './src/payload/seed';
const filename = fileURLToPath(import.meta.url); const filename = fileURLToPath(import.meta.url);
@@ -64,7 +62,6 @@ export default buildConfig({
...defaultFeatures, ...defaultFeatures,
BlocksFeature({ BlocksFeature({
blocks: payloadBlocks, blocks: payloadBlocks,
inlineBlocks: [Email, Phone],
}), }),
], ],
}), }),

View File

@@ -1,25 +0,0 @@
import { Block } from 'payload';
export const Email: Block = {
slug: 'email',
interfaceName: 'EmailBlock',
labels: {
singular: 'Email (Inline)',
plural: 'Emails (Inline)',
},
fields: [
{
name: 'email',
type: 'text',
required: true,
},
{
name: 'label',
type: 'text',
required: false,
admin: {
placeholder: 'Optional: Custom link text',
},
},
],
};

View File

@@ -1,28 +0,0 @@
import { Block } from 'payload';
export const Phone: Block = {
slug: 'phone',
interfaceName: 'PhoneBlock',
labels: {
singular: 'Phone (Inline)',
plural: 'Phones (Inline)',
},
fields: [
{
name: 'phone',
type: 'text',
required: true,
admin: {
placeholder: '+49 123 456 789',
},
},
{
name: 'label',
type: 'text',
required: false,
admin: {
placeholder: 'Optional: Custom link text',
},
},
],
};

View File

@@ -1,6 +1,4 @@
import { AnimatedImage } from './AnimatedImage'; import { AnimatedImage } from './AnimatedImage';
import { Email } from './Email';
import { Phone } from './Phone';
import { Callout } from './Callout'; import { Callout } from './Callout';
import { CategoryGrid } from './CategoryGrid'; import { CategoryGrid } from './CategoryGrid';
import { ChatBubble } from './ChatBubble'; import { ChatBubble } from './ChatBubble';
@@ -23,8 +21,6 @@ import { homeBlocksArray } from './HomeBlocks';
export const payloadBlocks = [ export const payloadBlocks = [
...homeBlocksArray, ...homeBlocksArray,
AnimatedImage, AnimatedImage,
Email,
Phone,
Callout, Callout,
CategoryGrid, CategoryGrid,
ChatBubble, ChatBubble,