Skip to content

Commit bf07d27

Browse files
committed
ci: configure GitHub Actions for Pages deployment and permission updates
1 parent 5ca1813 commit bf07d27

File tree

8 files changed

+848
-801
lines changed

8 files changed

+848
-801
lines changed

.github/workflows/homebrew.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ permissions:
1919
contents: write
2020
packages: write
2121
actions: read
22+
pages: write
23+
id-token: write
2224

2325
# Global environment variables
2426
env:
@@ -535,6 +537,51 @@ jobs:
535537
echo ""
536538
echo "🔗 Homebrew Guidelines: https://docs.brew.sh/Adding-Software-to-Homebrew"
537539
540+
- name: Setup Pages
541+
uses: actions/configure-pages@v4
542+
543+
- name: Prepare deployment files
544+
run: |
545+
echo "📁 Preparing GitHub Pages deployment from scripts directory..."
546+
547+
# 确保scripts目录存在
548+
if [ ! -d "scripts" ]; then
549+
echo "❌ scripts directory not found!"
550+
exit 1
551+
fi
552+
553+
# 显示将要部署的文件
554+
echo "Files to be deployed:"
555+
ls -la scripts/
556+
557+
# 验证关键文件存在
558+
if [ ! -f "scripts/windows" ]; then
559+
echo "❌ scripts/windows file not found!"
560+
exit 1
561+
fi
562+
563+
if [ ! -f "scripts/index.html" ]; then
564+
echo "❌ scripts/index.html file not found!"
565+
exit 1
566+
fi
567+
568+
echo "✅ All required files found"
569+
570+
- name: Upload artifact
571+
uses: actions/upload-pages-artifact@v3
572+
with:
573+
path: ./scripts
574+
575+
- name: Deploy to GitHub Pages
576+
id: deployment
577+
uses: actions/deploy-pages@v4
578+
579+
- name: Deployment summary
580+
run: |
581+
echo "🎉 GitHub Pages deployment completed!"
582+
echo "📄 Site URL: ${{ steps.deployment.outputs.page_url }}"
583+
echo "🔗 Install command: powershell -Command \"irm https://litiantian123-code.github.io/agbcloud-cli/windows | iex\""
584+
538585
- name: Validate Official Formula
539586
run: |
540587
echo "🧪 Validating Official Homebrew Formula (Source Build Mode)..."

0 commit comments

Comments
 (0)