mirror of
https://github.com/zopiya/x-eden-quartz.git
synced 2025-11-03 06:16:47 +08:00
update config
This commit is contained in:
18
.github/workflows/build-and-deploy.yml
vendored
18
.github/workflows/build-and-deploy.yml
vendored
@@ -2,14 +2,14 @@ name: Build and Deploy Quartz Site
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 6 * * *' # 每天早上 6 点(UTC)执行一次定时任务
|
- cron: '0 6 * * 1' # 每周一早上 6 点(UTC)执行一次定时任务
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main # 当 main 分支有新提交时触发工作流
|
- main # 当 main 分支有新提交时触发工作流
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-and-deploy:
|
build-and-deploy:
|
||||||
environment: default
|
environment: prod
|
||||||
runs-on: ubuntu-latest # 使用最新的 Ubuntu 运行环境
|
runs-on: ubuntu-latest # 使用最新的 Ubuntu 运行环境
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Quartz Repository
|
- name: Checkout Quartz Repository
|
||||||
@@ -23,7 +23,7 @@ jobs:
|
|||||||
- name: Clone Wiki Repository and Clean Private Folders
|
- name: Clone Wiki Repository and Clean Private Folders
|
||||||
run: |
|
run: |
|
||||||
# 克隆 Wiki 仓库到临时目录
|
# 克隆 Wiki 仓库到临时目录
|
||||||
git clone https://${{ secrets.GITEA_REPO_READ }}@git.7wate.org/zhouzhongping/wiki.git /tmp/wiki
|
git clone "${{ secrets.GITEA_REPO_CLONE }}" /tmp/wiki
|
||||||
# 删除私密文件夹(如 Personal 文件夹)
|
# 删除私密文件夹(如 Personal 文件夹)
|
||||||
rm -rf /tmp/wiki/Personal
|
rm -rf /tmp/wiki/Personal
|
||||||
# 如果有其他私密文件夹,也可以在这里添加删除命令
|
# 如果有其他私密文件夹,也可以在这里添加删除命令
|
||||||
@@ -47,9 +47,11 @@ jobs:
|
|||||||
npm ci # 使用 npm ci 安装依赖,确保一致性
|
npm ci # 使用 npm ci 安装依赖,确保一致性
|
||||||
npx quartz build # 使用 Quartz 构建静态网站
|
npx quartz build # 使用 Quartz 构建静态网站
|
||||||
|
|
||||||
- name: Deploy to HTML Branch
|
- name: Deploy to GitHub Pages
|
||||||
uses: peaceiris/actions-gh-pages@v3 # 使用 gh-pages Action 部署到 GitHub Pages
|
uses: peaceiris/actions-gh-pages@v4
|
||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }} # 使用 GitHub Token 进行身份验证
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
publish_dir: ./public # 指定构建输出目录
|
publish_dir: ./public
|
||||||
publish_branch: html # 部署到 html 分支
|
cname: x-eden.zopiya.com
|
||||||
|
user_name: 'github-actions[bot]'
|
||||||
|
user_email: 'github-actions[bot]@users.noreply.github.com'
|
||||||
@@ -12,10 +12,10 @@ const config: QuartzConfig = {
|
|||||||
enableSPA: true, // 启用单页应用
|
enableSPA: true, // 启用单页应用
|
||||||
enablePopovers: true, // 启用弹出框
|
enablePopovers: true, // 启用弹出框
|
||||||
analytics: {
|
analytics: {
|
||||||
provider: 'umami', host: 'https://umami.7wate.com/', websiteId: 'c061efdc-95dd-4d21-9d04-a1ffda0a85b9'
|
provider: 'umami', host: 'https://umami.7wate.org/', websiteId: 'a6fb0d88-e549-4a69-9859-7679a8a0c696'
|
||||||
},
|
},
|
||||||
locale: "zh-CN", // 语言区域
|
locale: "zh-CN", // 语言区域
|
||||||
baseUrl: "wiki.7wate.com", // 基础 URL
|
baseUrl: "x-eden.zopiya.com", // 基础 URL
|
||||||
ignorePatterns: ["Obsidian", ".obsidian"], // 忽略的模式
|
ignorePatterns: ["Obsidian", ".obsidian"], // 忽略的模式
|
||||||
defaultDateType: "created", // 默认日期类型
|
defaultDateType: "created", // 默认日期类型
|
||||||
theme: {
|
theme: {
|
||||||
|
|||||||
Reference in New Issue
Block a user