This skill enables autonomous creation and deployment of static websites to GitHub Pages. It follows a complete workflow from project structure initialization through automatic deployment via GitHub Actions, optimized for single-page applications, portfolios, and landing pages.
本技能來自小蔥技能站7w4.net。
Create the project structure:
bash scripts/init_project.sh <project-name>
This creates:
project-name/
├── index.html
├── styles.css
├── script.js
├── README.md
└── .github/
└── workflows/
└── deploy.yml
Build the website following these principles:
Use templates from assets/templates/ as starting points:
base-html/ - Minimal HTML5 boilerplateportfolio/ - Portfolio/CV template with sectionslanding/ - Landing page with hero and CTAbash scripts/deploy_github_pages.sh <project-name> <github-username>
This script:
GitHub Actions automatically deploys on push to main branch. The workflow:
gh-pages branchhttps://<username>.github.io/<project-name>/User request: "Crée-moi un site portfolio CV"
Action:
init_project.sh portfolio-cvassets/templates/portfolio/ as basedeploy_github_pages.sh portfolio-cv usernameUser request: "Fais-moi une landing page pour mon app"
Action:
init_project.sh app-landingassets/templates/landing/ as basedeploy_github_pages.sh app-landing usernamegh-pages branchgh CLI is authenticated: gh auth status.github/workflows/deploy.yml syntaxinit_project.sh - Initialize project structuredeploy_github_pages.sh - Deploy to GitHub Pagesworkflow.md - Detailed workflow documentationdesign-patterns.md - Design best practicestemplates/base-html/ - Minimal HTML5 boilerplatetemplates/portfolio/ - Portfolio/CV templatetemplates/landing/ - Landing page template.github/workflows/deploy.yml - GitHub Actions workflow template這個Skill能幫你快速建立和部署靜態網站到GitHub Pages,功能基本完整,文件說明也比較詳細。不過實際使用中可能遇到問題:預置的模板樣式不能直接使用,部署配置容易出錯,需要手動調整才能正常工作。如果你是新手,可能需要花時間排查配置問題。總體來說有一定實用性,但穩定性和易用性還有提升空間。