docs: note published Gitea repository; fix push helper for missing origin

This commit is contained in:
ClassIsland Prompt Kit committed 2026-11-13 07:45:08 +08:00
1 parent 50cda6f5c1
commit 1de986c05d
2 files changed
+5 -1

No files matched your search

+2 -1
View File
@@ -71,7 +71,8 @@ const main = async () => {
const scheme = base.split('://')[0];
const host = base.split('://')[1];
const authUrl = `${scheme}://${encodeURIComponent(login)}:${encodeURIComponent(token)}@${host}/${login}/${repo}.git`;
git(['remote', 'remove', 'origin']);
const remotes = spawnSync('git', ['remote'], { encoding: 'utf8' }).stdout || '';
if (/\borigin\b/.test(remotes)) git(['remote', 'remove', 'origin']);
git(['remote', 'add', 'origin', authUrl]);
try {
const pushed = git(['push', '-u', 'origin', 'HEAD:main']);