back version
This commit is contained in:
30
.github/workflows/deploy.yml
vendored
30
.github/workflows/deploy.yml
vendored
@@ -6,22 +6,11 @@ on:
|
||||
- main
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
pages: write
|
||||
id-token: write
|
||||
|
||||
# 允许一个并发部署
|
||||
concurrency:
|
||||
group: "pages"
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build-and-deploy:
|
||||
environment:
|
||||
name: github-pages
|
||||
url: ${{ steps.deployment.outputs.page_url }}
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
@@ -38,14 +27,9 @@ jobs:
|
||||
- name: Generate site
|
||||
run: node generator.js
|
||||
|
||||
- name: Setup Pages
|
||||
uses: actions/configure-pages@v3
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-pages-artifact@v2
|
||||
with:
|
||||
path: '.'
|
||||
|
||||
- name: Deploy to GitHub Pages
|
||||
id: deployment
|
||||
uses: actions/deploy-pages@v2
|
||||
uses: JamesIves/github-pages-deploy-action@v4
|
||||
with:
|
||||
folder: .
|
||||
branch: gh-pages
|
||||
clean: true
|
||||
13
README.md
13
README.md
@@ -53,16 +53,15 @@ npm run generate
|
||||
|
||||
### GitHub Pages 部署
|
||||
|
||||
注意:GitHub Pages 在免费计划下只支持公开仓库。如果你需要保持仓库私有,建议使用 Cloudflare Pages 部署(支持私有仓库)。
|
||||
注意:GitHub Pages 在免费计划下只支持公开仓库。如果你需要保持仓库私有,建议:
|
||||
- 升级到 GitHub Pro 或更高级的付费计划
|
||||
- 或使用 Cloudflare Pages 部署(支持私有仓库)
|
||||
|
||||
部署步骤:
|
||||
1. Fork 这个仓库
|
||||
2. 修改 `config.yml` 文件,自定义你的导航内容
|
||||
3. 提交更改
|
||||
4. 等待 GitHub Actions 自动完成部署(约1-2分钟)
|
||||
5. 访问你的站点:`https://你的用户名.github.io/menav/`
|
||||
|
||||
全程自动化部署,无需任何手动设置。
|
||||
2. 修改你的配置
|
||||
3. 推送到GitHub
|
||||
4. 启用GitHub Pages(选择 gh-pages 分支)
|
||||
|
||||
### Cloudflare Pages 部署
|
||||
|
||||
|
||||
Reference in New Issue
Block a user