Browse Source

initial commit (#1)

* initial commit

* ci: add github pages
LoGin 10 months ago
parent
commit
95d0df3936

+ 104 - 0
.github/workflows/deploy.yml

@@ -0,0 +1,104 @@
+name: Build and Deploy
+on:
+  push:
+    branches: [ "master"]
+  pull_request:
+    branches: [ "master" ]
+
+jobs:
+
+  ensure-toolchain:
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v3
+        
+      - name: Setup Node.js environment
+        uses: actions/setup-node@v3.7.0
+        with:
+          node-version: "20.11.0"
+      
+      - name: Cache dependencies
+        id: cache-node-modules
+        uses: actions/cache@v3
+        env:
+          cache-name: cache-node-modules
+        with:
+          path: ./node_modules
+          key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('package.json') }}
+      
+      - name: echo node version
+        run: node -v
+      
+      - if: ${{ steps.cache-node-modules.outputs.cache-hit != 'true' }}
+        name: Install dependencies
+        continue-on-error: true
+        run: | 
+          sudo apt update && sudo apt install -y build-essential
+          source ~/.bashrc
+          npm install
+  
+  build:
+    runs-on: ubuntu-latest
+    needs: [ensure-toolchain]
+    steps:
+      - uses: actions/checkout@v3
+
+      - name: Cache dependencies
+        id: cache-node-modules
+        uses: actions/cache@v3
+        env:
+          cache-name: cache-node-modules
+        with:
+          path: ./node_modules
+          key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('package.json') }}
+      
+      - name: Setup Node.js environment
+        uses: actions/setup-node@v3.7.0
+        with:
+          node-version: "20.11.0"
+      
+      - name: echo node version
+        run: node -v
+      
+      - name: Build
+        run: npm run docs:build
+
+  deploy:
+    runs-on: ubuntu-latest
+    needs: [ensure-toolchain]
+    environment:
+      name: github-pages
+    steps:
+      - name: Check github secrets
+        run: sh -c 'if [ -z "${{ secrets.ACTIONS_DEPLOY_KEY }}" ]; then
+            echo "GitHub Actions deploy key is missing";
+            exit 1;
+          fi'
+      
+      - uses: actions/checkout@v3
+
+      - name: Cache dependencies
+        id: cache-node-modules
+        uses: actions/cache@v3
+        env:
+          cache-name: cache-node-modules
+        with:
+          path: ./node_modules
+          key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('package.json') }}
+      
+      - name: Setup Node.js environment
+        uses: actions/setup-node@v3.7.0
+        with:
+          node-version: "20.11.0"
+      
+      - name: Build
+        run: npm run docs:build
+      
+      - name: Set CNAME
+        run: echo 'community.dragonos.org' > ./.vuepress/dist/CNAME
+      
+      - name: Deploy
+        uses: peaceiris/actions-gh-pages@v3
+        with:
+          deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
+          publish_dir: ./.vuepress/dist

+ 9 - 0
.gitignore

@@ -0,0 +1,9 @@
+node_modules
+*.lock
+package-lock.json
+# VuePress 默认临时文件目录
+.vuepress/.temp
+# VuePress 默认缓存目录
+.vuepress/.cache
+# VuePress 默认构建生成的静态文件目录
+.vuepress/dist

+ 59 - 0
.vuepress/config.js

@@ -0,0 +1,59 @@
+import { viteBundler } from '@vuepress/bundler-vite'
+import { defaultTheme } from '@vuepress/theme-default'
+import { defineUserConfig } from 'vuepress'
+
+export default defineUserConfig({
+    bundler: viteBundler(),
+
+    theme: defaultTheme(
+        {
+            repo: 'DragonOS-Community/community',
+            repoLabel: 'GitHub',
+            // 默认是 false, 设置为 true 来启用
+            editLinks: true,
+            // 默认为 "Edit this page"
+            editLinkText: '帮助我们改善此页面!',
+            smoothScroll: true,
+            docsBranch: 'master',
+            logo: '/images/dragonos-full-logo.svg',
+            nextLinks: true,
+            navbar: [
+                {
+                    'text': '首页',
+                    'link': '/',
+                },
+                {
+                    'text': '社区治理',
+                    'link': '/governance/',
+                },
+                {
+                    'text': '交流',
+                    'link': '/communication/',
+                },
+                {
+                    'text': '贡献者',
+                    'link': '/contributors/',
+                },
+                {
+                    'text': 'SIGs',
+                    'link': '/sigs/',
+                },
+            ],
+            sidebar: {
+                '/': 'heading',
+                '/governance/': [
+                    {
+                        text: '社区治理',
+                        children: [
+                            '/governance/',
+                            '/governance/community-membership.md',
+                        ]
+                    }
+                ]
+            }
+        }
+    ),
+    lang: 'zh-CN',
+    title: '',
+
+})

File diff suppressed because it is too large
+ 0 - 0
.vuepress/public/images/dragonos-full-logo.svg


+ 61 - 1
README.md

@@ -1 +1,61 @@
-# Community
+
+<div align="center">
+  <img width="40%" src="/images/dragonos-full-logo.svg" alt="dragonos-logo"></br>
+  <h2>DragonOS Community</h2>
+
+<a href="https://dragonos.org"><img alt="官网" src="https://img.shields.io/badge/%E5%AE%98%E7%BD%91-DragonOS.org-4c69e4?link=https%3A%2F%2Fbbs.dragonos.org.cn" ></a>
+<a href="https://bbs.dragonos.org.cn"><img alt="bbs" src="https://img.shields.io/badge/BBS-bbs.dragonos.org.cn-purple?link=https%3A%2F%2Fbbs.dragonos.org.cn" ></a>
+
+
+
+---
+
+</div>
+
+欢迎来到DragonOS社区!
+
+本文是加入并参与DragonOS社区贡献的起点,包括改进文档、改进代码或是参与社区会议等等...
+
+如果您想了解更多关于项目结构以及DragonOS社区的内容,请转到[社区治理]以获取更多的信息!
+
+本文档的在线版本:[community.dragonos.org](community.dragonos.org)
+
+## 交流讨论
+
+[社区交流]页面列出了DragonOS社区的公开交流渠道,如论坛、QQ群、会议等等。
+
+对于更加具体的主题的讨论,请在SIG内进行。
+
+## 社区治理
+
+DragonOS社区官方支持以下类型的团体:
+
+- **委员会** 是一组负责处理敏感话题的人员。社区官方鼓励该小组在能完成其使命的同时,尽可能开放其信息。
+  但由于所讨论的主题的性质,这些讨论可能会在封闭的群组中进行。委员会的包括社区管理委员会(CMC)、
+  项目管理委员会(PMC)、法务与合规委员会(LCC)等委员会。
+- **特别兴趣小组(SIG)** 是专注于项目的一部分的持续开放团体。特别兴趣小组的程序必须公开透明。
+  欢迎任何人参与并做出贡献,只要他们遵守 DragonOS 社区行为准则。
+  SIG 的目的是拥有并开发一组**子项目**。
+   * **子项目** 每个 SIG 可以有一组子项目。
+    这些是可以独立工作的较小团体。
+* **工作组**是为了解决跨 SIG 边界的问题而成立的临时小组。
+  工作组不拥有任何代码或其他长期工件。
+  工作组可以通过相关的 SIG 进行汇报并采取行动。
+
+有关这些组的更多详细信息,请参阅[完整治理文档](governance/README.md)。 
+
+## 参与贡献
+
+要参与贡献,第一步是从[DragonOS社区SIG列表](sigs/README.md)中选择一个感兴趣的SIG。参与他们的会议,
+加入他们在bbs上的板块。每个SIG通常都会有一些正在进行的,或者等待开发/解决的问题,可以帮助新的贡献者参与其中。
+
+[贡献者指南]介绍了如何让您的想法和bugfix能被看到及接受的详细说明,在参与贡献之前,您应该先阅读它。
+
+## 社区成员资格
+
+我们鼓励所有贡献者成为社区成员。我们的目标是发展一个由贡献者、审阅者和代码维护者组成的活跃、健康的社区。在我们的[社区成员资格]页面中了解有关会员资格要求和责任的更多信息。
+
+[社区治理]: governance/README.md
+[社区交流]: communication/README.md
+[贡献者指南]: contributors/README.md
+[社区成员资格]: governance/community-membership.md

+ 1 - 0
communication/README.md

@@ -0,0 +1 @@
+# Communication

+ 3 - 0
contributors/README.md

@@ -0,0 +1,3 @@
+# 贡献者指南
+
+TODO

+ 3 - 0
governance/README.md

@@ -0,0 +1,3 @@
+# Governance
+
+TODO

+ 1 - 0
governance/community-membership.md

@@ -0,0 +1 @@
+# 社区成员资格

+ 25 - 0
package.json

@@ -0,0 +1,25 @@
+{
+  "name": "community",
+  "version": "1.0.0",
+  "description": "",
+  "main": "index.js",
+  "scripts": {
+    "docs:dev": "vuepress dev",
+    "docs:build": "vuepress build"
+  },
+  "repository": {
+    "type": "git",
+    "url": "git+https://github.com/DragonOS-Community/Community.git"
+  },
+  "author": "",
+  "license": "GPL-2.0",
+  "bugs": {
+    "url": "https://github.com/DragonOS-Community/Community/issues"
+  },
+  "homepage": "https://github.com/DragonOS-Community/Community#readme",
+  "devDependencies": {
+    "@vuepress/bundler-vite": "^2.0.0-rc.11",
+    "@vuepress/theme-default": "^2.0.0-rc.30",
+    "vuepress": "^2.0.0-rc.11"
+  }
+}

+ 1 - 0
sigs/README.md

@@ -0,0 +1 @@
+# SIG

Some files were not shown because too many files changed in this diff