ci: streamline docs workflows, migrate scripts to ci/scripts and update www image
services/docs - next/required / Setup - Hugo (push) Failing after 0s
services/docs - next/required / Build - Hugo Site (push) Skipped
services/docs - next/required / Release - Docker Image (push) Skipped
services/docs - next/required / Deploy - Kubernetes (GitOps) (push) Skipped
services/docs - next/required / Verify - Production Rollout (push) Skipped
services/static - next/required / Setup - Stage (push) Successful in 42s
services/www - next/required / Setup - Stage (push) Successful in 41s
services/static - next/required / Build - Configs (push) Successful in 24s
services/www - next/required / Build - Configs (push) Successful in 26s
services/static - next/required / Typecheck - Static (push) Successful in 21s
services/static - next/required / Build - Static Site (push) Successful in 23s
services/www - next/required / Typecheck - WWW (push) Successful in 21s
services/www - next/required / Build - Storybook (push) Successful in 27s
services/static - next/required / Lint - Static (push) Successful in 23s
services/www - next/required / Lint - WWW (push) Successful in 26s
services/www - next/required / Test - Unit (push) Successful in 21s
services/static - next/required / Deploy - S3 (push) Canceled after 0s
services/www - next/required / Test - Storybook (push) Canceled after 0s
services/www - next/required / Build - Docker Image (push) Canceled after 0s
services/www - next/required / Build - WWW Service (push) Canceled after 35s

This commit is contained in:
deytenit committed 2026-11-08 01:21:48 +03:00
1 parent fea1928e0c
commit 984dd04fe1
10 files changed
+440 -63

No files matched your search

+27
View File
@@ -0,0 +1,27 @@
import os
import re
import shlex
import subprocess
import sys
import tempfile
from pathlib import Path
def main():
ref=sys.argv[1]
if ref not in ('HEAD:next','trunk') and not re.fullmatch(r'refs/tags/[A-Za-z0-9][A-Za-z0-9._-]*',ref):
raise ValueError('Unexpected publication ref')
repository=os.environ['GITHUB_REPOSITORY']
if not re.fullmatch(r'deytenit/[A-Za-z0-9_.-]+',repository):
raise ValueError('Unexpected repository owner')
with tempfile.TemporaryDirectory(prefix='gitea-write-key-') as directory:
key=Path(directory)/'key';key.write_text(os.environ['GIT_WRITE_KEY']);key.chmod(0o600)
known=Path(__file__).resolve().parent.parent/'.gitea'/'known_hosts'
if not known.exists():
known=Path(__file__).resolve().parent.parent/'known_hosts'
env=dict(os.environ);env.pop('GIT_WRITE_KEY',None)
env['GIT_SSH_COMMAND']=shlex.join(['ssh','-T','-i',str(key),'-o','IdentitiesOnly=yes','-o','StrictHostKeyChecking=yes','-o','HostKeyAlgorithms=ssh-ed25519','-o','UserKnownHostsFile='+str(known)])
subprocess.run(['git','push','ssh://git@git.ermnvldmr.com:22222/'+repository+'.git',ref],env=env,check=True)
if __name__=='__main__':main()