generated from kaiyuanshe/China-Open-Source-Report-Template
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 8c30d7a
Showing
239 changed files
with
10,882 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
name: Deploy to GitHub Pages & Gitee Page & Vercel | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
# 如果你想要进一步定义触发条件、路径等,可以查看文档 | ||
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on | ||
|
||
jobs: | ||
deploy: | ||
env: | ||
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }} | ||
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} | ||
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} | ||
LARK_CHATBOT_HOOK_URL: ${{ secrets.LARK_CHATBOT_HOOK_URL }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Deploy to Vercel | ||
id: vercel-deployment | ||
uses: amondnet/vercel-action@v25 | ||
if: ${{ env.VERCEL_TOKEN && env.VERCEL_ORG_ID && env.VERCEL_PROJECT_ID }} | ||
with: | ||
vercel-token: ${{ secrets.VERCEL_TOKEN }} | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }} | ||
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }} | ||
working-directory: ./ | ||
vercel-args: --prod | ||
|
||
- uses: pnpm/action-setup@v2 | ||
with: | ||
version: 8 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
cache: pnpm | ||
|
||
- name: Install dependencies | ||
run: pnpm i | ||
|
||
- name: Build website for GitHub | ||
run: pnpm build | ||
- name: Deploy to GitHub Pages | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
personal_token: ${{ secrets.GITHUB_TOKEN }} | ||
# 要发布到 `gh-pages` 分支的构建输出: | ||
publish_dir: ./.vitepress/dist | ||
force_orphan: true | ||
|
||
- name: Build website for gitee | ||
run: VITE_DEPLOYMENT_ENVIRONMENT=gitee pnpm build | ||
- name: Deploy to Gitee Pages | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
personal_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_branch: gitee # default: gh-pages | ||
publish_dir: ./.vitepress/dist | ||
force_orphan: true | ||
|
||
- name: Lark notification | ||
uses: foxundermoon/feishu-action@v2 | ||
if: ${{ env.LARK_CHATBOT_HOOK_URL }} | ||
with: | ||
url: ${{ secrets.LARK_CHATBOT_HOOK_URL }} | ||
msg_type: post | ||
content: | | ||
post: | ||
zh_cn: | ||
title: Vercel 预览环境 | ||
content: | ||
- - tag: text | ||
text: Git 仓库: | ||
- tag: a | ||
text: ${{ github.server_url }}/${{ github.repository }} | ||
href: ${{ github.server_url }}/${{ github.repository }} | ||
- - tag: text | ||
text: 代码分支: | ||
- tag: a | ||
text: ${{ github.ref }} | ||
href: ${{ github.server_url }}/${{ github.repository }}/tree/${{ github.ref_name }} | ||
- - tag: text | ||
text: 预览链接: | ||
- tag: a | ||
text: ${{ steps.vercel-deployment.outputs.preview-url }} | ||
href: ${{ steps.vercel-deployment.outputs.preview-url }} | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: Pull Request | ||
on: | ||
push: | ||
branches-ignore: | ||
- main | ||
jobs: | ||
Build-and-Deploy: | ||
env: | ||
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }} | ||
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} | ||
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} | ||
LARK_CHATBOT_HOOK_URL: ${{ secrets.LARK_CHATBOT_HOOK_URL }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
if: ${{ env.VERCEL_TOKEN && env.VERCEL_ORG_ID && env.VERCEL_PROJECT_ID }} | ||
|
||
- name: Deploy to Vercel | ||
id: vercel-deployment | ||
uses: amondnet/vercel-action@v25 | ||
if: ${{ env.VERCEL_TOKEN && env.VERCEL_ORG_ID && env.VERCEL_PROJECT_ID }} | ||
with: | ||
vercel-token: ${{ secrets.VERCEL_TOKEN }} | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }} | ||
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }} | ||
working-directory: ./ | ||
|
||
- name: Lark notification | ||
uses: foxundermoon/feishu-action@v2 | ||
if: ${{ env.LARK_CHATBOT_HOOK_URL }} | ||
with: | ||
url: ${{ secrets.LARK_CHATBOT_HOOK_URL }} | ||
msg_type: post | ||
content: | | ||
post: | ||
zh_cn: | ||
title: Vercel 预览环境 | ||
content: | ||
- - tag: text | ||
text: Git 仓库: | ||
- tag: a | ||
text: ${{ github.server_url }}/${{ github.repository }} | ||
href: ${{ github.server_url }}/${{ github.repository }} | ||
- - tag: text | ||
text: 代码分支: | ||
- tag: a | ||
text: ${{ github.ref }} | ||
href: ${{ github.server_url }}/${{ github.repository }}/tree/${{ github.ref_name }} | ||
- - tag: text | ||
text: 预览链接: | ||
- tag: a | ||
text: ${{ steps.vercel-deployment.outputs.preview-url }} | ||
href: ${{ steps.vercel-deployment.outputs.preview-url }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
|
||
# dependencies | ||
/node_modules | ||
/.pnp | ||
.pnp.js | ||
|
||
# testing | ||
/coverage | ||
|
||
# next.js | ||
/.next/ | ||
/out/ | ||
|
||
# PWA | ||
public/sw.js | ||
public/sw.js.map | ||
public/workbox-*.js | ||
public/workbox-*.js.map | ||
public/worker-*.js | ||
public/worker-*.js.map | ||
|
||
# production | ||
/build | ||
|
||
# misc | ||
.DS_Store | ||
*.pem | ||
|
||
# debug | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# local env files | ||
.env.local | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
|
||
# vercel | ||
.vercel | ||
|
||
# typescript | ||
*.tsbuildinfo | ||
|
||
# IDE | ||
.vscode/settings.json | ||
|
||
.vitepress/dist | ||
.vitepress/cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import { defineConfig } from 'vitepress' | ||
|
||
// https://vitepress.dev/reference/site-config | ||
export const en = defineConfig({ | ||
lang: 'en-US', | ||
title: "2023 COSR", | ||
description: "2023 China Open Source Report", | ||
|
||
themeConfig: { | ||
nav: [ | ||
{ text: 'Home', link: '/en' }, | ||
{ text: 'Annual report of previous years', link: 'https://kaiyuanshe.feishu.cn/wiki/wikcnUDeVll6PNzw900yPV71Sxd', target: '_blank' } | ||
], | ||
|
||
sidebar: [ | ||
{ | ||
items: [ | ||
{ text: 'Preface', link: '/en/preface' }, | ||
{ text: 'OSS Questionnaire', link: '/en/questionnaire' }, | ||
{ text: 'OSS Data Analytics', link: '/en/data' }, | ||
{ text: 'OSS Commercialization', link: '/en/commercialization' }, | ||
{ text: 'OSS Chronicle', link: '/en/open-source-milestones' }, | ||
] | ||
} | ||
], | ||
|
||
footer: { | ||
message: 'Released under the CC BY-SA 4.0 License.', | ||
copyright: 'Copyright © 2014-present KAIYUANSHE' | ||
}, | ||
|
||
editLink: { | ||
pattern: 'https://github.com/kaiyuanshe/2023-China-Open-Source-Report/edit/main/:path', | ||
text: 'Edit this page on GitHub' | ||
}, | ||
}, | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { defineConfig } from 'vitepress' | ||
import { shared } from './shared.mts' | ||
import { en } from './en.mts' | ||
import { zh } from './zh.mts' | ||
|
||
export default defineConfig({ | ||
...shared, | ||
|
||
locales: { | ||
root: { label: '简体中文', ...zh }, | ||
en: { label: 'English', ...en }, | ||
}, | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
import { defineConfig } from 'vitepress'; | ||
|
||
const deploymentEnvironment = process.env.VITE_DEPLOYMENT_ENVIRONMENT; | ||
|
||
export const shared = defineConfig({ | ||
lastUpdated: true, | ||
|
||
base: deploymentEnvironment === 'gitee' ? '/2023-china-open-source-report/' : deploymentEnvironment === 'vercel' ? '' : '/2023-China-Open-Source-Report/', | ||
|
||
head: [ | ||
['link', { rel: 'icon', type: 'image/x-icon', href: '/image/China-Open-Source-Report.ico' }], | ||
['link', { rel: 'icon', type: 'image/x-icon', href: '/2023-China-Open-Source-Report/image/China-Open-Source-Report.ico' }], | ||
[ | ||
'script', | ||
{ async: '', src: 'https://www.googletagmanager.com/gtag/js?id=G-7CSQ2KPB1F' } | ||
], | ||
[ | ||
'script', | ||
{}, | ||
`window.dataLayer = window.dataLayer || []; | ||
function gtag(){dataLayer.push(arguments);} | ||
gtag('js', new Date()); | ||
gtag('config', 'G-7CSQ2KPB1F');` | ||
] | ||
], | ||
|
||
themeConfig: { | ||
logo: '/image/China-Open-Source-Report.png', | ||
|
||
socialLinks: [ | ||
{ icon: 'github', link: 'https://github.com/kaiyuanshe/2023-China-Open-Source-Report' }, | ||
{ | ||
icon: { | ||
svg: | ||
`<svg height="32" viewBox="0 0 32 32" width="32" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><circle cx="16" cy="16" fill="#c71d23" r="16"/><path d="m24.0987698 14.2225144h-9.0863697c-.4362899.000207-.7900048.3538292-.790326.7901191l-.0005173 1.9752185c-.0003277.4363707.353328.7902117.7896987.790326.0000712 0 .0001424 0 .0002135-.0002135l5.5317648-.0000461c.4363708-.0000102.7901221.3537352.7901257.790106 0 .0000022 0 .0000044-.0000066.0000066v.1975077.1975318c0 1.3091122-1.0612451 2.3703573-2.3703573 2.3703573h-7.5067195c-.4363081-.0000218-.790009-.353713-.7900429-.7900211l-.0002069-7.5059917c-.0001014-1.3091122 1.0611145-2.3703865 2.3702267-2.3704226.0000217 0 .0000435 0 .0000653.0000653h11.0602463c.4361793-.0004902.7898484-.35394.7906091-.79011894l.0012251-1.97521881c.0007606-.43637034-.3527683-.79033806-.7891389-.79060871-.0001634-.0000001-.0003268-.00000015-.0004901.00048976h-11.0617654c-3.27278051 0-5.92589329 2.65311278-5.92589329 5.9258933v11.0612755c0 .4363707.35374837.7901191.7901191.7901191h11.65447149c2.9454379 0 5.3331872-2.3877493 5.3331872-5.3331872v-4.5430682c0-.4363707-.3537484-.7901191-.7901191-.7901191z" fill="#fff"/></g></svg>` | ||
}, | ||
link: 'https://gitee.com/kaiyuanshe/2023-China-Open-Source-Report' | ||
} | ||
], | ||
|
||
search: { | ||
provider: 'local' | ||
}, | ||
|
||
externalLinkIcon: true, | ||
} | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
import { defineConfig } from 'vitepress' | ||
|
||
// https://vitepress.dev/reference/site-config | ||
export const zh = defineConfig({ | ||
lang: 'zh-Hans', | ||
title: "2023 中国开源年度报告", | ||
description: "2023 中国开源年度报告", | ||
|
||
themeConfig: { | ||
nav: [ | ||
{ text: '首页', link: '/' }, | ||
{ text: '往年年报', link: 'https://kaiyuanshe.feishu.cn/wiki/wikcnUDeVll6PNzw900yPV71Sxd', target: '_blank' } | ||
], | ||
|
||
sidebar: [ | ||
{ | ||
items: [ | ||
{ text: '卷首语', link: '/preface' }, | ||
{ text: '问卷篇', link: '/questionnaire' }, | ||
{ text: '数据篇', link: '/data' }, | ||
{ text: '商业化篇', link: '/commercialization' }, | ||
{ text: '开源大事记', link: '/open-source-milestones' }, | ||
] | ||
} | ||
], | ||
|
||
footer: { | ||
message: 'Released under the CC BY-SA 4.0 License.', | ||
copyright: 'Copyright © 2014-present KAIYUANSHE' | ||
}, | ||
|
||
editLink: { | ||
pattern: 'https://github.com/kaiyuanshe/2023-China-Open-Source-Report/edit/main/:path', | ||
text: '在 GitHub 上编辑本页内容' | ||
}, | ||
|
||
lastUpdated: { | ||
text: '更新于', | ||
}, | ||
|
||
docFooter: { | ||
prev: '上一页', | ||
next: '下一页' | ||
}, | ||
}, | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Released under the CC BY-SA 4.0 License. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# 2023 中国开源年度报告 | ||
|
||
![GitHub Repo stars](https://img.shields.io/github/stars/kaiyuanshe/2023-China-Open-Source-Report?style=for-the-badge) | ||
![GitHub contributors](https://img.shields.io/github/contributors/kaiyuanshe/2023-China-Open-Source-Report?style=for-the-badge) | ||
![GitHub last commit](https://img.shields.io/github/last-commit/kaiyuanshe/2023-China-Open-Source-Report?style=for-the-badge) | ||
|
||
在线地址:https://kaiyuanshe.github.io/2023-China-Open-Source-Report/ | ||
|
||
👏 如有问题,欢迎提 issue 或 PR。 | ||
|
||
## 文件目录 | ||
|
||
- 中文版 | ||
- [卷首语](./preface.md) | ||
- [问卷篇](./questionnaire.md) | ||
- [数据篇](./data.md) | ||
- [商业化篇](./commercialization.md) | ||
- [开源大事记](./open-source-milestones.md) | ||
- English | ||
- [Preface](./en/preface.md) | ||
- [OSS Questionnaire](./en/questionnaire.md) | ||
- [OSS Data Analytics](./en/data.md) | ||
- [OSS Commercialization](./en/commercialization.md) | ||
- [OSS Chronicle](./en/open-source-milestones.md) | ||
|
||
## 许可证 | ||
|
||
Released under the CC BY-SA 4.0 License. |
Oops, something went wrong.