mirror of
https://github.com/prompt-security/clawsec.git
synced 2026-06-22 09:51:21 +03:00
Codex/fix readme video links (#76)
* fix(readme): use github-safe demo previews and links * fix(readme): use only github-hosted demo links * fix(wiki): map wiki root to index * feat(readme): add lightweight animated gif demo previews * refactor(wiki): generate Home from INDEX during sync * fix(ci): remove github token write scopes in workflows * chore(ci): use existing poll token for write automation
This commit is contained in:
@@ -7,8 +7,7 @@ on:
|
||||
- 'wiki/**'
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
permissions: read-all
|
||||
|
||||
concurrency:
|
||||
group: wiki-sync
|
||||
@@ -23,7 +22,7 @@ jobs:
|
||||
|
||||
- name: Sync wiki folder to repository wiki
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
AUTOMATION_TOKEN: ${{ secrets.POLL_NVD_CVES_PAT }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
|
||||
@@ -32,7 +31,20 @@ jobs:
|
||||
exit 1
|
||||
fi
|
||||
|
||||
WIKI_REMOTE="https://x-access-token:${GITHUB_TOKEN}@github.com/${{ github.repository }}.wiki.git"
|
||||
if [ -z "$AUTOMATION_TOKEN" ]; then
|
||||
echo "::error::Set POLL_NVD_CVES_PAT with repo write permissions."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# GitHub Wiki root (/wiki) renders Home.md, not INDEX.md.
|
||||
# INDEX.md is the canonical source; generate Home.md from it.
|
||||
if [ ! -f wiki/INDEX.md ]; then
|
||||
echo "::error::wiki/INDEX.md not found. It is required to generate wiki/Home.md."
|
||||
exit 1
|
||||
fi
|
||||
cp wiki/INDEX.md wiki/Home.md
|
||||
|
||||
WIKI_REMOTE="https://x-access-token:${AUTOMATION_TOKEN}@github.com/${{ github.repository }}.wiki.git"
|
||||
if ! git ls-remote "$WIKI_REMOTE" >/dev/null 2>&1; then
|
||||
echo "::warning::Wiki remote unavailable (repository wiki may be disabled). Skipping sync."
|
||||
exit 0
|
||||
|
||||
Reference in New Issue
Block a user