File tree Expand file tree Collapse file tree 1 file changed +28
-4
lines changed Expand file tree Collapse file tree 1 file changed +28
-4
lines changed Original file line number Diff line number Diff line change @@ -72,10 +72,34 @@ jobs:
72
72
"https://api.github.com/repos/fishcpy/astro-theme-fishcpy" | grep -q '"name"'; then
73
73
echo "✅ Target repository exists"
74
74
else
75
- echo "❌ Target repository does not exist!"
76
- echo "Please create the repository: https://github.com/fishcpy/astro-theme-fishcpy"
77
- echo "Or check if the repository name is correct"
78
- exit 1
75
+ echo "❌ Target repository does not exist, creating it..."
76
+
77
+ # 创建仓库
78
+ CREATE_RESPONSE=$(curl -s -X POST \
79
+ -H "Authorization: token $PAT_TOKEN" \
80
+ -H "Accept: application/vnd.github.v3+json" \
81
+ https://api.github.com/user/repos \
82
+ -d '{
83
+ "name": "astro-theme-fishcpy",
84
+ "description": "A beautiful Astro theme - fishcpy edition",
85
+ "private": true,
86
+ "auto_init": false
87
+ }')
88
+
89
+ # 检查创建结果
90
+ if echo "$CREATE_RESPONSE" | grep -q '"name"'; then
91
+ echo "✅ Repository created successfully!"
92
+ else
93
+ echo "❌ Failed to create repository"
94
+ echo "Response: $CREATE_RESPONSE"
95
+ echo ""
96
+ echo "Please manually create the repository:"
97
+ echo "1. Go to https://github.com/new"
98
+ echo "2. Repository name: astro-theme-fishcpy"
99
+ echo "3. Make it private"
100
+ echo "4. Don't initialize with README"
101
+ exit 1
102
+ fi
79
103
fi
80
104
81
105
# 添加远程仓库
You can’t perform that action at this time.
0 commit comments