generated from icrdr/omoolab-project
Compare commits
10 Commits
main
...
docs-deplo
| Author | SHA1 | Date | |
|---|---|---|---|
| d2425dc2be | |||
| 890105302a | |||
| b5a4850677 | |||
| 5fe1c07b7b | |||
| fbcbcd3565 | |||
| 78e6a05888 | |||
| 0e5b3527b0 | |||
| 1065700037 | |||
| fc267ca92a | |||
| dd7dd2ebe8 |
@@ -1,19 +0,0 @@
|
||||
name: Gitea Actions Demo
|
||||
run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
Explore-Gitea-Actions:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- run: echo "🎉 The job was automatically triggered by a ${{ gitea.event_name }} event."
|
||||
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by Gitea!"
|
||||
- run: echo "🔎 The name of your branch is ${{ gitea.ref }} and your repository is ${{ gitea.repository }}."
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@v4
|
||||
- run: echo "💡 The ${{ gitea.repository }} repository has been cloned to the runner."
|
||||
- run: echo "🖥️ The workflow is now ready to test your code on the runner."
|
||||
- name: List files in the repository
|
||||
run: |
|
||||
ls ${{ gitea.workspace }}
|
||||
- run: echo "🍏 This job's status is ${{ job.status }}."
|
||||
81
.github/workflows/deploy.yaml
vendored
Normal file
81
.github/workflows/deploy.yaml
vendored
Normal file
@@ -0,0 +1,81 @@
|
||||
name: Deploy to Aliyun OSS
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "wiki-*" # 当推送 wiki-* 开头的 tag 时触发
|
||||
branches:
|
||||
- "main" # 当推送 main 分支时触发
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Set variable
|
||||
run: |
|
||||
REPO_NAME=${{ github.event.repository.name }}
|
||||
|
||||
# 判断触发类型
|
||||
if [[ "${{ github.ref_type }}" == "tag" ]]; then
|
||||
# Tag 触发:去掉 "wiki-" 前缀
|
||||
TAG_NAME=${{ github.ref_name }}
|
||||
CLEAN_TAG_NAME=${TAG_NAME#wiki-}
|
||||
BASE_PATH="/$REPO_NAME/$CLEAN_TAG_NAME/"
|
||||
else
|
||||
# Branch 触发:使用仓库名
|
||||
TAG_NAME=""
|
||||
BASE_PATH="/$REPO_NAME/"
|
||||
fi
|
||||
|
||||
echo "REPO_NAME=$REPO_NAME" >> $GITHUB_ENV
|
||||
echo "TAG_NAME=$TAG_NAME" >> $GITHUB_ENV
|
||||
echo "BASE_PATH=$BASE_PATH" >> $GITHUB_ENV
|
||||
|
||||
echo "Repository: $REPO_NAME"
|
||||
echo "Tag: $TAG_NAME"
|
||||
echo "Base path: $BASE_PATH"
|
||||
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Fetch wiki LFS files
|
||||
run: |
|
||||
git lfs install
|
||||
git lfs pull --include wiki
|
||||
|
||||
- name: Update VitePress base path
|
||||
run: |
|
||||
sed -i "s|base: '.*'|base: '$BASE_PATH'|g" wiki/.vitepress/config.mts
|
||||
echo "Updated base path to: $BASE_PATH"
|
||||
|
||||
- name: Install pnpm
|
||||
uses: pnpm/action-setup@v6
|
||||
with:
|
||||
version: 10
|
||||
|
||||
- name: Install dependencies
|
||||
run: pnpm install
|
||||
|
||||
- name: Build VitePress
|
||||
run: pnpm wiki:build
|
||||
|
||||
- name: Setup Aliyun CLI
|
||||
run: |
|
||||
wget https://aliyuncli.alicdn.com/aliyun-cli-linux-latest-amd64.tgz
|
||||
tar -xzf aliyun-cli-linux-latest-amd64.tgz
|
||||
sudo mv aliyun /usr/local/bin/
|
||||
aliyun configure set \
|
||||
--profile default \
|
||||
--mode AK \
|
||||
--access-key-id ${{ secrets.OSS_ACCESS_KEY_ID }} \
|
||||
--access-key-secret ${{ secrets.OSS_ACCESS_KEY_SECRET }} \
|
||||
--region ${{ secrets.OSS_REGION }}
|
||||
|
||||
- name: Deploy to OSS
|
||||
run: |
|
||||
OSS_PATH=oss://${{ secrets.OSS_BUCKET }}$BASE_PATH
|
||||
echo "Deploying to: $OSS_PATH"
|
||||
aliyun oss cp wiki/.vitepress/dist $OSS_PATH --recursive --update
|
||||
env:
|
||||
OSS_ENDPOINT: ${{ secrets.OSS_ENDPOINT }}
|
||||
8
.gitignore
vendored
8
.gitignore
vendored
@@ -14,6 +14,13 @@ ENV/
|
||||
env.bak/
|
||||
venv.bak/
|
||||
|
||||
.secrets
|
||||
.secrets.*
|
||||
!.secrets.example
|
||||
secrets/
|
||||
SECRETS/
|
||||
secrets.bak/
|
||||
|
||||
# Claude
|
||||
.claudian
|
||||
|
||||
@@ -21,6 +28,7 @@ venv.bak/
|
||||
.obsidian/*
|
||||
!.obsidian/snippets
|
||||
!.obsidian/app.json
|
||||
!.obsidian/plugins/
|
||||
|
||||
# Blender
|
||||
*.blend1
|
||||
|
||||
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
[submodule ".obsidian/plugins/odox"]
|
||||
path = .obsidian/plugins/odox
|
||||
url = https://git.omoolab.xyz/icrdr/odox.git
|
||||
1
.obsidian/plugins/odox
vendored
Submodule
1
.obsidian/plugins/odox
vendored
Submodule
Submodule .obsidian/plugins/odox added at 0e051b7293
5
.secrets.example
Normal file
5
.secrets.example
Normal file
@@ -0,0 +1,5 @@
|
||||
OSS_ENDPOINT =
|
||||
OSS_ACCESS_KEY_ID =
|
||||
OSS_ACCESS_KEY_SECRET =
|
||||
OSS_BUCKET =
|
||||
OSS_REGION =
|
||||
19
CLAUDE.md
Normal file
19
CLAUDE.md
Normal file
@@ -0,0 +1,19 @@
|
||||
## 代码风格
|
||||
|
||||
- 避免嵌套结构
|
||||
- 特殊的、非常规的需要写注释
|
||||
- 计划、规则文档用中文为主(专有名词、约定俗称可以用英文)
|
||||
- 注释用中文为主(专有名词、约定俗称可以用英文)
|
||||
- 变量、函数名、Docstring 用全英文
|
||||
- 同一事物用统一表达
|
||||
- 使用的依赖越少越好
|
||||
- 选用简单直接的方式实现
|
||||
- 代码、执行方式改变,调整已有的文档、计划,而非新建
|
||||
- Markdown 中不使用`---`分割器
|
||||
|
||||
本地运行 action
|
||||
```bash
|
||||
act push -j deploy \
|
||||
--secret-file .secrets \
|
||||
-e event.json
|
||||
```
|
||||
@@ -1,3 +1,3 @@
|
||||
---
|
||||
brief: An omoospace project
|
||||
---
|
||||
---
|
||||
|
||||
36
deploy.sh
Normal file
36
deploy.sh
Normal file
@@ -0,0 +1,36 @@
|
||||
#!/bin/bash
|
||||
|
||||
# 检查 wiki 目录是否有变更
|
||||
CHANGED_FILES=$(git diff --name-only wiki && git ls-files --others --exclude-standard wiki)
|
||||
|
||||
if [ -n "$CHANGED_FILES" ]; then
|
||||
echo "检测到 wiki 目录有变更,正在提交..."
|
||||
git add wiki
|
||||
git commit -m "Update wiki"
|
||||
else
|
||||
echo "wiki 目录没有变更,跳过提交"
|
||||
fi
|
||||
|
||||
# 自动获取当前 Git 分支名
|
||||
BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD)
|
||||
|
||||
# 获取仓库名称
|
||||
REMOTE_URL=$(git remote get-url origin)
|
||||
REPO_NAME=$(basename -s .git "$REMOTE_URL")
|
||||
|
||||
# 拼接 Tag 名称:wiki-分支名
|
||||
TAG_NAME="wiki-$BRANCH_NAME"
|
||||
|
||||
echo "当前分支:$BRANCH_NAME"
|
||||
|
||||
# 创建本地 Tag
|
||||
git tag -f "$TAG_NAME"
|
||||
|
||||
# 推送到远程仓库
|
||||
if git push origin -f "$TAG_NAME"; then
|
||||
echo -e "\n✅ $BRANCH_NAME 创建并推送成功,等待部署完毕"
|
||||
echo -e "\n🌍 部署地址:https://wiki.omoolab.com/$REPO_NAME/$BRANCH_NAME/"
|
||||
else
|
||||
echo -e "\n❌ $BRANCH_NAME 推送失败!"
|
||||
exit 1
|
||||
fi
|
||||
5
event.json
Normal file
5
event.json
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"repository": {
|
||||
"name": "action-sandbox"
|
||||
}
|
||||
}
|
||||
BIN
notes/assets/20260421-074743.png
LFS
Normal file
BIN
notes/assets/20260421-074743.png
LFS
Normal file
Binary file not shown.
BIN
notes/assets/Untitled.png
LFS
Normal file
BIN
notes/assets/Untitled.png
LFS
Normal file
Binary file not shown.
7
notes/测试导出.md
Normal file
7
notes/测试导出.md
Normal file
@@ -0,0 +1,7 @@
|
||||
# 测试笔记 - Canvas 导出
|
||||
|
||||
这是一个用于测试 Canvas 导出功能的笔记。
|
||||
|
||||

|
||||
|
||||
![[测试画板-1.canvas]]
|
||||
14
notes/测试画板-1.canvas
Normal file
14
notes/测试画板-1.canvas
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"nodes":[
|
||||
{"id":"b42845a8ff7d51dc","x":6380,"y":-3440,"width":1330,"height":1418,"color":"3","type":"group","label":"Untitled group"},
|
||||
{"id":"2780851064da9bdb","type":"file","file":"notes/assets/Untitled.png","x":6580,"y":-3160,"width":460,"height":460},
|
||||
{"id":"596415dba7899135","type":"text","text":"发生的方式方式大幅\n\n撒地方士大夫三大发生的f\n\n的萨芬阿斯蒂芬撒地方\n\n\n撒地方撒地方啊色粉啊色粉\n\n啊色粉啊色粉啊色粉","x":7744,"y":-2649,"width":376,"height":313},
|
||||
{"id":"860c29754b1b08bf","type":"text","text":"sdfasdf\nasdfasdfasdf\n# fsadfs fasdf asdf asdf ","x":6810,"y":-3310,"width":496,"height":300},
|
||||
{"id":"ad3484c9e0322d05","type":"text","text":"发色粉撒而非","x":6360,"y":-2740,"width":500,"height":280},
|
||||
{"id":"c494f34282f42d91","type":"file","file":"notes/assets/20260421-074743.png","x":7306,"y":-2938,"width":198,"height":198}
|
||||
],
|
||||
"edges":[
|
||||
{"id":"a7a9eb1b8977f036","fromNode":"ad3484c9e0322d05","fromSide":"right","toNode":"c494f34282f42d91","toSide":"left"},
|
||||
{"id":"fdb0bd6d9376876f","fromNode":"c494f34282f42d91","fromSide":"right","toNode":"596415dba7899135","toSide":"left"}
|
||||
]
|
||||
}
|
||||
8
notes/测试画板-2.canvas
Normal file
8
notes/测试画板-2.canvas
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"nodes":[
|
||||
{"id":"7e7d72b0a9c50a3f","x":-233,"y":-166,"width":250,"height":60,"type":"text","text":"sdfsdgas"},
|
||||
{"id":"c241e3a59c834dc3","x":-67,"y":21,"width":50,"height":299,"type":"text","text":"sadfasefasef"},
|
||||
{"id":"d6852f6e96eaf1f5","x":16,"y":114,"width":224,"height":146,"type":"text","text":"asefasef"}
|
||||
],
|
||||
"edges":[]
|
||||
}
|
||||
10
package.json
Normal file
10
package.json
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"devDependencies": {
|
||||
"vitepress": "2.0.0-alpha.17"
|
||||
},
|
||||
"scripts": {
|
||||
"wiki:dev": "vitepress dev wiki",
|
||||
"wiki:build": "vitepress build wiki",
|
||||
"wiki:preview": "vitepress preview wiki"
|
||||
}
|
||||
}
|
||||
1388
pnpm-lock.yaml
generated
Normal file
1388
pnpm-lock.yaml
generated
Normal file
File diff suppressed because it is too large
Load Diff
53
wiki/.vitepress/config.mts
Normal file
53
wiki/.vitepress/config.mts
Normal file
@@ -0,0 +1,53 @@
|
||||
import { defineConfig } from 'vitepress'
|
||||
|
||||
// https://vitepress.dev/reference/site-config
|
||||
export default defineConfig({
|
||||
title: "OmooLab",
|
||||
description: "An OmooLab Project",
|
||||
base: '/', // Replace with your repository name if deploying to GitHub Pages
|
||||
themeConfig: {
|
||||
logo: '/logo.png',
|
||||
siteTitle: false,
|
||||
nav: [
|
||||
{ text: '首页', link: '/' },
|
||||
{ text: '记录', link: '/notes/' },
|
||||
{ text: '我们', link: 'https://www.omoolab.xyz' }
|
||||
],
|
||||
sidebar: {
|
||||
'/': [
|
||||
{
|
||||
text: '导航',
|
||||
items: [
|
||||
{ text: '首页', link: '/' },
|
||||
{ text: '笔记列表', link: '/notes/' },
|
||||
{ text: '测试笔记', link: '/notes/测试导出/' }
|
||||
]
|
||||
}
|
||||
],
|
||||
'/notes/': [
|
||||
{
|
||||
text: '笔记',
|
||||
items: [
|
||||
{ text: '所有笔记', link: '/notes/' },
|
||||
{ text: '测试笔记', link: '/notes/测试导出/' }
|
||||
]
|
||||
},
|
||||
{
|
||||
text: '画板',
|
||||
items: [
|
||||
{ text: '测试画板 1', link: '/notes/测试画板-1.canvas/' },
|
||||
{ text: '测试画板 2', link: '/notes/测试画板-2.canvas/' }
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
footer: {
|
||||
message: '<a href="https://beian.miit.gov.cn/" target="_blank">浙ICP备2025208399号-1</a>',
|
||||
copyright: 'Copyright © 2025-present OmooLab'
|
||||
},
|
||||
search: {
|
||||
provider: 'local'
|
||||
}
|
||||
},
|
||||
|
||||
})
|
||||
1145
wiki/.vitepress/theme/components/Viewer.vue
Normal file
1145
wiki/.vitepress/theme/components/Viewer.vue
Normal file
File diff suppressed because it is too large
Load Diff
10
wiki/.vitepress/theme/index.js
Normal file
10
wiki/.vitepress/theme/index.js
Normal file
@@ -0,0 +1,10 @@
|
||||
import DefaultTheme from 'vitepress/theme'
|
||||
import Viewer from './components/Viewer.vue'
|
||||
|
||||
/** @type {import('vitepress').Theme} */
|
||||
export default {
|
||||
extends: DefaultTheme,
|
||||
enhanceApp({ app }) {
|
||||
app.component('Viewer', Viewer)
|
||||
}
|
||||
}
|
||||
26
wiki/index.md
Normal file
26
wiki/index.md
Normal file
@@ -0,0 +1,26 @@
|
||||
# 风风风
|
||||
|
||||
## 📚 最新内容
|
||||
|
||||
### 测试笔记
|
||||
测试 Canvas 导出功能和图片查看器组件
|
||||
|
||||
[查看笔记 →](/notes/测试导出/)
|
||||
|
||||
|
||||
|
||||
## 🗂️ 内容分类
|
||||
|
||||
### 笔记 & 文档
|
||||
- [测试笔记](/notes/测试导出/) - Canvas 导出功能测试
|
||||
|
||||
### 画板
|
||||
- [测试画板 1](/notes/测试画板-1.canvas/)
|
||||
- [测试画板 2](/notes/测试画板-2.canvas/)
|
||||
|
||||
|
||||
|
||||
## 🔗 快速链接
|
||||
|
||||
- [关于我们](https://www.omoolab.xyz) - 了解更多关于 OmooLab 的信息
|
||||
- [备案信息](https://beian.miit.gov.cn/) - 浙ICP备2025208399号-1
|
||||
17
wiki/notes/index.md
Normal file
17
wiki/notes/index.md
Normal file
@@ -0,0 +1,17 @@
|
||||
# 📝 笔记记录
|
||||
|
||||
这里收录了我们的学习和工作笔记。
|
||||
|
||||
## 📂 笔记列表
|
||||
|
||||
### 测试笔记
|
||||
- [测试笔记 - Canvas 导出](./测试导出/) - 测试 Canvas 导出功能和图片查看器组件
|
||||
|
||||
## 🎨 画板
|
||||
|
||||
- [测试画板 1](./测试画板-1.canvas/) - 第一个测试画板
|
||||
- [测试画板 2](./测试画板-2.canvas/) - 第二个测试画板
|
||||
|
||||
---
|
||||
|
||||
> 💡 **提示**:使用上方搜索框可以快速查找你需要的内容。
|
||||
7
wiki/notes/测试导出/index.md
Normal file
7
wiki/notes/测试导出/index.md
Normal file
@@ -0,0 +1,7 @@
|
||||
# 测试笔记 - Canvas 导出
|
||||
|
||||
这是一个用于测试 Canvas 导出功能的笔记。
|
||||
|
||||
<Viewer src="/测试画板-2.canvas.png" />
|
||||
|
||||
<Viewer src="/测试画板-1.canvas.png" />
|
||||
1
wiki/notes/测试画板-1.canvas/index.md
Normal file
1
wiki/notes/测试画板-1.canvas/index.md
Normal file
@@ -0,0 +1 @@
|
||||

|
||||
1
wiki/notes/测试画板-2.canvas/index.md
Normal file
1
wiki/notes/测试画板-2.canvas/index.md
Normal file
@@ -0,0 +1 @@
|
||||
<Viewer src="/测试画板-2.canvas.png" />
|
||||
BIN
wiki/public/canvas.canvas.png
LFS
Normal file
BIN
wiki/public/canvas.canvas.png
LFS
Normal file
Binary file not shown.
BIN
wiki/public/logo.png
LFS
Normal file
BIN
wiki/public/logo.png
LFS
Normal file
Binary file not shown.
BIN
wiki/public/测试画板-1.canvas.png
LFS
Normal file
BIN
wiki/public/测试画板-1.canvas.png
LFS
Normal file
Binary file not shown.
BIN
wiki/public/测试画板-2.canvas.png
LFS
Normal file
BIN
wiki/public/测试画板-2.canvas.png
LFS
Normal file
Binary file not shown.
Reference in New Issue
Block a user