๐ Deployment Guide โ
English | ็ฎไฝไธญๆ
This project is configured with GitHub Actions for automatic deployment. Every push to the main branch automatically deploys to GitHub Pages.
๐ Deployment Status โ
- ๐ข passing - Deployment successful
- ๐ด failing - Deployment failed
- ๐ก in progress - Deploying
๐ฏ First-Time Deployment (Required Reading) โ
โ ๏ธ Important: Enable GitHub Pages First! โ
Correct Order:
- โ Enable GitHub Pages first
- โ Then push code to deploy
Step 1: Enable GitHub Pages โ
Visit repository settings:
https://github.com/naodeng/awesome-qa-prompt/settings/pagesIn the "Build and deployment" section:
- Source: Select "GitHub Actions" (not "Deploy from a branch")
- Click Save
Confirm settings are saved (page shows "Your site is ready to be published")
Step 2: Push Code โ
bash
git add .
git commit -m "feat: configure GitHub Pages auto-deployment"
git push origin mainStep 3: Wait for Deployment โ
- View deployment progress: https://github.com/naodeng/awesome-qa-prompt/actions
- First deployment takes about 2-3 minutes
- Wait for workflow to show green checkmark โ
Step 4: Visit Website โ
After successful deployment, visit:
https://naodeng.github.io/awesome-qa-prompt/๐ Daily Updates โ
After configuration, each update only requires:
bash
# 1. Edit documentation
vim README.md
# 2. Commit and push
git add .
git commit -m "docs: update documentation"
git push origin main
# 3. Auto-deploy (no manual action needed)
# GitHub Actions will automatically complete deployment๐ Deployment Workflow Explanation โ
Workflow Process โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Push to main branch โ
โโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Job 1: Build VitePress Site โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ ๐ฅ Checkout repository โ
โ ๐ข Setup Node.js (v20) โ
โ โ๏ธ Setup Pages โ
โ ๐ฆ Install dependencies (npm ci) โ
โ ๐๏ธ Build site (npm run docs:build)โ
โ ๐ค Upload artifact โ
โโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Job 2: Deploy to GitHub Pages โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ ๐ Deploy to GitHub Pages โ
โ ๐ Deployment complete โ
โโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ โ
Site live at: โ
โ https://naodeng.github.io/ โ
โ awesome-qa-prompt/ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโTrigger Conditions โ
- โ
Push to
mainbranch - โ Manual trigger (click "Run workflow" on Actions page)
Build Time โ
- First build: ~2-3 minutes
- Subsequent builds: ~1-2 minutes
View Deployment Logs โ
- Visit Actions page: https://github.com/naodeng/awesome-qa-prompt/actions
- Click on the latest workflow run
- View detailed logs for each step (with emoji icons for easy identification)
๐ป Local Development โ
Install Dependencies โ
bash
npm installStart Development Server โ
bash
npm run docs:devVisit http://localhost:5173 to view.
Build Production Version โ
bash
npm run docs:buildPreview Production Version โ
bash
npm run docs:preview๐ Troubleshooting โ
Issue 1: "Get Pages site failed" or "Not Found" Error โ
Error Message:
Error: Get Pages site failed
Error: HttpError: Not FoundCause: GitHub Pages not yet enabled
Solution:
- Visit https://github.com/naodeng/awesome-qa-prompt/settings/pages
- Select "GitHub Actions" for Source
- Click Save
- Click "Re-run all jobs" on the Actions page
Issue 2: Deployment Failed โ
View Logs:
- Visit https://github.com/naodeng/awesome-qa-prompt/actions
- Click on the failed workflow
- View error messages
Common Causes:
- Dependency installation failed: Delete
node_modulesand reinstall - Build error: Check Markdown file syntax
- Permission issue: Confirm Actions has read/write permissions
Issue 3: Website Shows 404 โ
Solution:
- Confirm GitHub Pages Source is set to "GitHub Actions"
- Check
.vitepress/config.mtshasbase: '/awesome-qa-prompt/' - Clear browser cache and retry
Issue 4: Missing Styles โ
Solution:
- Confirm
basepath is configured correctly - Clear browser cache
- Redeploy
๐ Deployment Checklist โ
Before First Deployment โ
- [ ] GitHub Pages enabled
- [ ] Source set to "GitHub Actions"
- [ ]
baseconfigured correctly in.vitepress/config.mts - [ ] Code pushed to
mainbranch
After First Deployment โ
- [ ] Actions workflow runs successfully (green checkmark)
- [ ] Website accessible
- [ ] All features working
- [ ] README badge shows "passing"
๐ Related Links โ
- Online Documentation: https://naodeng.github.io/awesome-qa-prompt/
- GitHub Repository: https://github.com/naodeng/awesome-qa-prompt
- Actions Logs: https://github.com/naodeng/awesome-qa-prompt/actions
- Pages Settings: https://github.com/naodeng/awesome-qa-prompt/settings/pages
๐ก Tips โ
- First-time setup: Must enable Pages before running Actions
- Source selection: Must select "GitHub Actions", not "Deploy from a branch"
- Auto-deployment: After configuration, every push auto-deploys
- Deployment time: Usually completes in 2-3 minutes
Need help? Check Actions logs for detailed error information.