Skip to content

๐Ÿš€ 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 โ€‹

Deploy to GitHub Pages

  • ๐ŸŸข passing - Deployment successful
  • ๐Ÿ”ด failing - Deployment failed
  • ๐ŸŸก in progress - Deploying

๐ŸŽฏ First-Time Deployment (Required Reading) โ€‹

โš ๏ธ Important: Enable GitHub Pages First! โ€‹

Correct Order:

  1. โœ… Enable GitHub Pages first
  2. โœ… Then push code to deploy

Step 1: Enable GitHub Pages โ€‹

  1. Visit repository settings:

    https://github.com/naodeng/awesome-qa-prompt/settings/pages
  2. In the "Build and deployment" section:

    • Source: Select "GitHub Actions" (not "Deploy from a branch")
    • Click Save
  3. 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 main

Step 3: Wait for Deployment โ€‹

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 main branch
  • โœ… Manual trigger (click "Run workflow" on Actions page)

Build Time โ€‹

  • First build: ~2-3 minutes
  • Subsequent builds: ~1-2 minutes

View Deployment Logs โ€‹

  1. Visit Actions page: https://github.com/naodeng/awesome-qa-prompt/actions
  2. Click on the latest workflow run
  3. View detailed logs for each step (with emoji icons for easy identification)

๐Ÿ’ป Local Development โ€‹

Install Dependencies โ€‹

bash
npm install

Start Development Server โ€‹

bash
npm run docs:dev

Visit http://localhost:5173 to view.

Build Production Version โ€‹

bash
npm run docs:build

Preview 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 Found

Cause: GitHub Pages not yet enabled

Solution:

  1. Visit https://github.com/naodeng/awesome-qa-prompt/settings/pages
  2. Select "GitHub Actions" for Source
  3. Click Save
  4. Click "Re-run all jobs" on the Actions page

Issue 2: Deployment Failed โ€‹

View Logs:

  1. Visit https://github.com/naodeng/awesome-qa-prompt/actions
  2. Click on the failed workflow
  3. View error messages

Common Causes:

  • Dependency installation failed: Delete node_modules and reinstall
  • Build error: Check Markdown file syntax
  • Permission issue: Confirm Actions has read/write permissions

Issue 3: Website Shows 404 โ€‹

Solution:

  1. Confirm GitHub Pages Source is set to "GitHub Actions"
  2. Check .vitepress/config.mts has base: '/awesome-qa-prompt/'
  3. Clear browser cache and retry

Issue 4: Missing Styles โ€‹

Solution:

  1. Confirm base path is configured correctly
  2. Clear browser cache
  3. Redeploy

๐Ÿ“‹ Deployment Checklist โ€‹

Before First Deployment โ€‹

  • [ ] GitHub Pages enabled
  • [ ] Source set to "GitHub Actions"
  • [ ] base configured correctly in .vitepress/config.mts
  • [ ] Code pushed to main branch

After First Deployment โ€‹

  • [ ] Actions workflow runs successfully (green checkmark)
  • [ ] Website accessible
  • [ ] All features working
  • [ ] README badge shows "passing"


๐Ÿ’ก Tips โ€‹

  1. First-time setup: Must enable Pages before running Actions
  2. Source selection: Must select "GitHub Actions", not "Deploy from a branch"
  3. Auto-deployment: After configuration, every push auto-deploys
  4. Deployment time: Usually completes in 2-3 minutes

Need help? Check Actions logs for detailed error information.

ๅŸบไบŽ MIT ่ฎธๅฏๅ‘ๅธƒ