Skip to content

Commit 726726a

Browse files
committed
fix: resolve GitHub Pages deployment issues
- Replace all {{REPO_OWNER}} and {{REPO_NAME}} placeholders with actual values - Create dedicated GitHub Pages workflow (.github/workflows/pages.yml) - Fix scripts/windows and scripts/index.html placeholder issues - Ensure automatic deployment on push to master branch - Resolves connection issues when using GitHub Actions deployment
1 parent 101799a commit 726726a

7 files changed

Lines changed: 83 additions & 405 deletions

File tree

.github/workflows/pages.yml

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
name: Deploy GitHub Pages
2+
3+
# 触发条件:推送到master分支时自动部署
4+
on:
5+
push:
6+
branches: [ master, main ]
7+
workflow_dispatch:
8+
9+
# 设置权限
10+
permissions:
11+
contents: read
12+
pages: write
13+
id-token: write
14+
15+
# 并发控制:同时只能有一个部署任务
16+
concurrency:
17+
group: "pages"
18+
cancel-in-progress: false
19+
20+
jobs:
21+
deploy:
22+
name: Deploy to GitHub Pages
23+
runs-on: ubuntu-latest
24+
environment:
25+
name: github-pages
26+
url: ${{ steps.deployment.outputs.page_url }}
27+
28+
steps:
29+
- name: Checkout
30+
uses: actions/checkout@v4
31+
32+
- name: Setup Pages
33+
uses: actions/configure-pages@v4
34+
35+
- name: Prepare deployment files
36+
run: |
37+
echo "📁 Preparing GitHub Pages deployment from scripts directory..."
38+
39+
# 确保scripts目录存在
40+
if [ ! -d "scripts" ]; then
41+
echo "❌ scripts directory not found!"
42+
exit 1
43+
fi
44+
45+
# 显示将要部署的文件
46+
echo "Files to be deployed:"
47+
ls -la scripts/
48+
49+
# 验证关键文件存在
50+
if [ ! -f "scripts/windows" ]; then
51+
echo "❌ scripts/windows file not found!"
52+
exit 1
53+
fi
54+
55+
if [ ! -f "scripts/index.html" ]; then
56+
echo "❌ scripts/index.html file not found!"
57+
exit 1
58+
fi
59+
60+
echo "✅ All required files found"
61+
62+
- name: Upload artifact
63+
uses: actions/upload-pages-artifact@v3
64+
with:
65+
path: ./scripts
66+
67+
- name: Deploy to GitHub Pages
68+
id: deployment
69+
uses: actions/deploy-pages@v4
70+
71+
- name: Deployment summary
72+
run: |
73+
echo "🎉 GitHub Pages deployment completed!"
74+
echo "📄 Site URL: ${{ steps.deployment.outputs.page_url }}"
75+
echo "🔗 Install command: powershell -Command \"irm https://litiantian123-code.github.io/agbcloud-cli/windows | iex\""

docs/windows

Lines changed: 0 additions & 37 deletions
This file was deleted.

scripts/generate-server-files.sh

Lines changed: 0 additions & 88 deletions
This file was deleted.

scripts/index.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -97,11 +97,11 @@ <h2>🚀 Quick Installation</h2>
9797
<p>Install AgbCloud CLI with a single command:</p>
9898

9999
<h3>Windows (PowerShell)</h3>
100-
<div class="install-command" id="windows-cmd">powershell -Command "irm https://{{REPO_OWNER}}.github.io/{{REPO_NAME}}/windows | iex"</div>
100+
<div class="install-command" id="windows-cmd">powershell -Command "irm https://litiantian123-code.github.io/agbcloud-cli/windows | iex"</div>
101101
<button class="copy-btn" onclick="copyToClipboard('windows-cmd')">Copy Command</button>
102102

103103
<h3>Alternative Installation Methods</h3>
104-
<p>You can also download binaries directly from our <a href="https://github.com/{{REPO_OWNER}}/{{REPO_NAME}}/releases">GitHub Releases</a> page.</p>
104+
<p>You can also download binaries directly from our <a href="https://github.com/litiantian123-code/agbcloud-cli/releases">GitHub Releases</a> page.</p>
105105
</div>
106106

107107
<div class="features">
@@ -142,10 +142,10 @@ <h2>📖 Quick Start</h2>
142142
</div>
143143

144144
<div class="links">
145-
<a href="https://github.com/{{REPO_OWNER}}/{{REPO_NAME}}">GitHub Repository</a>
146-
<a href="https://github.com/{{REPO_OWNER}}/{{REPO_NAME}}/releases">Releases</a>
147-
<a href="https://github.com/{{REPO_OWNER}}/{{REPO_NAME}}/issues">Issues</a>
148-
<a href="https://github.com/{{REPO_OWNER}}/{{REPO_NAME}}/blob/main/docs/USER_GUIDE.md">Documentation</a>
145+
<a href="https://github.com/litiantian123-code/agbcloud-cli">GitHub Repository</a>
146+
<a href="https://github.com/litiantian123-code/agbcloud-cli/releases">Releases</a>
147+
<a href="https://github.com/litiantian123-code/agbcloud-cli/issues">Issues</a>
148+
<a href="https://github.com/litiantian123-code/agbcloud-cli/blob/main/docs/USER_GUIDE.md">Documentation</a>
149149
</div>
150150

151151
<script>

scripts/test.sh

Lines changed: 0 additions & 141 deletions
This file was deleted.

0 commit comments

Comments
 (0)