Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Job28703 authored Jul 16, 2024
0 parents commit a001b8e
Show file tree
Hide file tree
Showing 708 changed files with 25,791 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Auto detect text files and perform LF normalization
* text=auto
19 changes: 19 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: github-actions # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
open-pull-requests-limit: 99
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "daily"
# Disable version updates for npm dependencies
# https://docs.github.com/en/code-security/dependabot/dependabot-security-updates/configuring-dependabot-security-updates#overriding-the-default-behavior-with-a-configuration-file
open-pull-requests-limit: 0
21 changes: 21 additions & 0 deletions .github/workflows/dependabot-auto-approve.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Dependabot auto-approve
on: pull_request

permissions:
pull-requests: write

jobs:
dependabot:
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' }}
steps:
- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@v2
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
- name: Approve a PR
run: gh pr review --approve "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
23 changes: 23 additions & 0 deletions .github/workflows/dependabot-auto-merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Dependabot auto-merge
on: pull_request

permissions:
contents: write
pull-requests: write

jobs:
dependabot:
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' }}
steps:
- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@v2
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
- name: Enable auto-merge for Dependabot PRs
if: ${{contains(steps.metadata.outputs.dependency-names, 'my-dependency') && steps.metadata.outputs.update-type == 'version-update:semver-patch'}}
run: gh pr merge --auto --merge "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
61 changes: 61 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: docs build

on:
push:
branches:
# 确保这是你正在使用的分支名称
- main

jobs:
LearnData-build:
runs-on: ubuntu-latest
env:
FTP_HOST: ${{ secrets.ftp_host }}
steps:
- name: Checkout 🛎️
uses: actions/checkout@v4
with:
# 获取所有标记和分支的所有历史记录(updatetime 必须,否则每次都会变化)
fetch-depth: 0
# 如果文档包含 Git 子模块,请取消注释下一行
# submodules: true

- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9
run_install: true

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm

# 复制读书笔记到静态页面路径,并构建页面
- name: Build Docs
env:
NODE_OPTIONS: --max_old_space_size=8192
run: |-
pnpm cpx "docs/reading/**" docs/.vuepress/public/reading
pnpm run docs:build
> docs/.vuepress/dist/.nojekyll
- name: Deploy GitHub Pages
uses: JamesIves/github-pages-deploy-action@v4
with:
# 指定静态文件部署到的分支
branch: gh-pages
folder: docs/.vuepress/dist

# 如果配置了 FTP 服务器密钥,才会执行本步骤,将页面静态文件同步到服务器
- name: 📂 Sync files
if: env.FTP_HOST != ''
uses: SamKirkland/[email protected]
with:
local-dir: docs/.vuepress/dist/
server: ${{ secrets.ftp_host }}
username: ${{ secrets.ftp_username }}
password: ${{ secrets.ftp_password }}
port: ${{ secrets.ftp_port }} # 建议更改默认的 21 端口
timeout: 600000
15 changes: 15 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Node modules
**/node_modules/**

# Cache
**/.vuepress/.cache/**
# Temp
**/.vuepress/.temp/**
# Output
**/.vuepress/dist/**

# 自定义草稿箱
docs/_temp/

# GoodSync
_gsdata_/
24 changes: 24 additions & 0 deletions .markdownlint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"default": true,
"MD003": {
"style": "atx"
},
"MD004": {
"style": "dash"
},
"MD013": false,
"MD024": {
"allow_different_nesting": true
},
"MD033": {
"allowed_elements": ["br", "template", "script", "style", "BiliBili"]
},
"MD035": {
"style": "---"
},
"MD036": false,
"MD040": false,
"MD045": false,
"MD046": false,
"MD049": false
}
1 change: 1 addition & 0 deletions .markdownlintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
docs/reading/**
2 changes: 2 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
auto-install-peers=true
strict-peer-dependencies=false
16 changes: 16 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Vuepress Cache
**/.vuepress/.cache/**
# Vuepress Temp
**/.vuepress/.temp/**
# Vuepress Output
**/.vuepress/dist/**
**/.vuepress/templateBuild.html

# live2d
docs/.vuepress/public/live2d-widget/**

# Node modules
node_modules/

# pnpm lock file
pnpm-lock.yaml
Loading

0 comments on commit a001b8e

Please sign in to comment.