Some checks failed
Published content check / validate (push) Failing after 17s
git.zapret.moe в России заблокирован по имени, как и wiki.zapret.moe. Ссылки на Forgejo во всех заметках, футерах, wizard.html и главной заменены на git2.zapret.moe (включая закодированные адреса значков shields.io). Какое имя рабочее, теперь решают реестры хоста /etc/zapret-*-domains.conf через zapret-site-names: pre-commit хук vault отклоняет добавленные строки с заблокированным именем, сборка Quartz сама переводит ссылки и baseUrl на рабочие имена. Правило в AGENTS.md переписано под этот механизм. scripts/wiki-stats.py: переходы с любых имён вики и git (wikiN, gitN) больше не считаются внешними сайтами. content-check: проверка зеркал сторонних проектов узнаёт любое имя git. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
46 lines
1.8 KiB
YAML
46 lines
1.8 KiB
YAML
name: Published content check
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
validate:
|
|
runs-on: linux
|
|
timeout-minutes: 10
|
|
steps:
|
|
- name: Checkout committed files only
|
|
uses: https://data.forgejo.org/actions/checkout@v6
|
|
with:
|
|
persist-credentials: false
|
|
fetch-depth: 2
|
|
|
|
- name: Validate static content
|
|
shell: bash
|
|
run: |
|
|
set -euo pipefail
|
|
if git rev-parse --verify HEAD^ >/dev/null 2>&1; then
|
|
git diff --check HEAD^ HEAD
|
|
else
|
|
git show --check --format= HEAD
|
|
fi
|
|
test -f index.html
|
|
test -s index.html
|
|
test -f wizard.html
|
|
test -s wizard.html
|
|
|
|
- name: Reject legacy links to our GitHub account
|
|
shell: bash
|
|
run: |
|
|
set -euo pipefail
|
|
legacy_pattern='github\.com/(youtubediscord|zapretdiscordyoutube)(/|$)|raw\.githubusercontent\.com/(youtubediscord|zapretdiscordyoutube)(/|$)|gist\.github(usercontent)?\.com/loop-uh(/|$)|api\.github\.com/repos/(youtubediscord|zapretdiscordyoutube)(/|$)|youtubediscord\.github\.io(/|$)|img\.shields\.io/github/[^[:space:]]*youtubediscord|git@github\.com:youtubediscord'
|
|
if git grep -n -I -i -E -- "$legacy_pattern" -- . ':!.forgejo/workflows/content-check.yml'; then
|
|
echo 'Found a legacy link to our deleted GitHub account; use our Forgejo (git2.zapret.moe) instead.' >&2
|
|
exit 1
|
|
fi
|
|
if git grep -n -I -E -- 'git[0-9]*\.zapret\.moe/(api/v1/repos/)?zapretdiscordyoutube/[A-Za-z0-9._-]+-upstream' -- . ':!.forgejo/workflows/content-check.yml'; then
|
|
echo 'Found our mirror of a third-party project; use its official source instead.' >&2
|
|
exit 1
|
|
fi
|