1# .github/workflows/deploy.yml
2name: Deploy to Pages
3
4on:
5 push:
6 branches: [ main ]
7
8jobs:
9 build:
10 runs-on: ubuntu-latest
11 steps:
12 - uses: actions/checkout@v4
13 - uses: actions/setup-node@v4
14 with: { node-version: '20' }
15 - run: npm ci && npm run build
16 - uses: peaceiris/actions-gh-pages@v3
17 with:
18 github_token: ${{ secrets.GITHUB_TOKEN }}
19 publish_dir: ./dist
1# 无需配置文件!只需3步:
2
3# 1. 创建仓库,比如 username.github.io
4# 2. 推送 index.html
5git init
6git add .
7git commit -m "init: my website"
8git remote add origin git@github.com:user/user.github.io.git
9git push -u origin main
10
11# 3. Settings → Pages → Source: main
12# 站点自动发布到:
13# https://username.github.io
14
15# 支持自定义域名、HTTPS、Jekyll构建
16# 完全免费,流量无上限!
1<!-- username/README.md -->
2
3# Hi, I'm YourName 👋
4
5Full-Stack Developer | Open Source Lover
6
7
8
9- 🔭 Currently working on **CoolProject**
10- 🌱 Learning **Rust & WebAssembly**
11- 💬 Ask me about **React, Node, DevOps**
12- 📫 Reach me: your@email.com
13
14<!-- 这个README会显示在你的Profile页面 -->
15<!-- 创意无限:加动画、徽章、贡献图... -->