back version

This commit is contained in:
Zuoling Rong
2025-02-02 20:03:29 +08:00
parent 15b2b9a216
commit 2b24915c9a
2 changed files with 13 additions and 30 deletions

View File

@@ -6,22 +6,11 @@ on:
- main - main
workflow_dispatch: workflow_dispatch:
permissions:
contents: write
pages: write
id-token: write
# 允许一个并发部署
concurrency:
group: "pages"
cancel-in-progress: true
jobs: jobs:
build-and-deploy: build-and-deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest runs-on: ubuntu-latest
permissions:
contents: write
steps: steps:
- name: Checkout repository - name: Checkout repository
@@ -38,14 +27,9 @@ jobs:
- name: Generate site - name: Generate site
run: node generator.js 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 - name: Deploy to GitHub Pages
id: deployment uses: JamesIves/github-pages-deploy-action@v4
uses: actions/deploy-pages@v2 with:
folder: .
branch: gh-pages
clean: true

View File

@@ -53,16 +53,15 @@ npm run generate
### GitHub Pages 部署 ### GitHub Pages 部署
注意GitHub Pages 在免费计划下只支持公开仓库。如果你需要保持仓库私有,建议使用 Cloudflare Pages 部署(支持私有仓库)。 注意GitHub Pages 在免费计划下只支持公开仓库。如果你需要保持仓库私有,建议
- 升级到 GitHub Pro 或更高级的付费计划
- 或使用 Cloudflare Pages 部署(支持私有仓库)
部署步骤: 部署步骤:
1. Fork 这个仓库 1. Fork 这个仓库
2. 修改 `config.yml` 文件,自定义你的导航内容 2. 修改你的配置
3. 提交更改 3. 推送到GitHub
4. 等待 GitHub Actions 自动完成部署约1-2分钟 4. 启用GitHub Pages选择 gh-pages 分支
5. 访问你的站点:`https://你的用户名.github.io/menav/`
全程自动化部署,无需任何手动设置。
### Cloudflare Pages 部署 ### Cloudflare Pages 部署