From 20cc3767632fdadb87ff590040533dd699cbe9d6 Mon Sep 17 00:00:00 2001 From: ycy Date: Thu, 26 Dec 2024 21:39:04 +0800 Subject: [PATCH] fix: docs Signed-off-by: ycy --- .github/workflows/build.yaml | 19 +++++++ .github/workflows/lint-all.yaml | 50 ++++++++++++++++ .github/workflows/lint.yaml | 57 +++++++++++++++++++ docs/docker-ce.md | 2 +- hust-mirrors | 1 + .../2024/02-22-change.md | 16 ++++++ .../2024/03-12-change.md | 11 ++++ .../2024/03-28-change.md | 17 ++++++ .../2024/05-07-public-open.md | 18 ++++++ .../2024/06-26-maintain.md | 31 ++++++++++ 10 files changed, 221 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/build.yaml create mode 100644 .github/workflows/lint-all.yaml create mode 100644 .github/workflows/lint.yaml create mode 160000 hust-mirrors create mode 100644 i18n/en/docusaurus-plugin-content-blog/2024/02-22-change.md create mode 100644 i18n/en/docusaurus-plugin-content-blog/2024/03-12-change.md create mode 100644 i18n/en/docusaurus-plugin-content-blog/2024/03-28-change.md create mode 100644 i18n/en/docusaurus-plugin-content-blog/2024/05-07-public-open.md create mode 100644 i18n/en/docusaurus-plugin-content-blog/2024/06-26-maintain.md diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml new file mode 100644 index 0000000..5779d8d --- /dev/null +++ b/.github/workflows/build.yaml @@ -0,0 +1,19 @@ +name: Build + +on: + pull_request: + paths: + - '**/*' + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Install dependencies + run: yarn install + + - name: Build project + run: yarn build diff --git a/.github/workflows/lint-all.yaml b/.github/workflows/lint-all.yaml new file mode 100644 index 0000000..685c5da --- /dev/null +++ b/.github/workflows/lint-all.yaml @@ -0,0 +1,50 @@ +name: Lint All + +on: + workflow_dispatch: + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Install zhlint + run: yarn global add zhlint + + - name: Lint all Markdown files + run: | + mkdir -p linted_output + file_list="linted_output/file_list.txt" + linted_failed_file=$(mktemp) + echo 0 > "$linted_failed_file" + find . -type f -name '*.md' | while read -r file; do + set +e + zhlint "$file" + if [ $? -ne 0 ]; then + echo 1 > "$linted_failed_file" + echo "$file" >> "$file_list" + output_file="linted_output/report_and_suggested_fixes/$file" + mkdir -p "$(dirname "$output_file")" + zhlint "$file" --output="$output_file" > "$output_file.log" 2>&1 + fi + set -e + done + linted_failed=$(cat "$linted_failed_file") + rm "$linted_failed_file" + echo "linted_failed=$linted_failed" >> "$GITHUB_ENV" + + - name: Upload linted Markdown + uses: actions/upload-artifact@v4 + with: + name: linted-markdown + path: linted_output/ + + - name: Check lint errors + run: | + set -e + if [ "${{ env.linted_failed }}" -ne 0 ]; then + echo "Linting errors found. Please check the reports and suggested fixes in uploaded artifact." + exit 1 + fi diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml new file mode 100644 index 0000000..04e6432 --- /dev/null +++ b/.github/workflows/lint.yaml @@ -0,0 +1,57 @@ +name: Lint + +on: + pull_request: + paths: + - '**/*.md' + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Install zhlint + run: yarn global add zhlint + + - name: Get changed files + id: changed-files + uses: tj-actions/changed-files@v45 + with: + files: '**/*.md' + + - name: Lint Markdown files + env: + ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }} + run: | + mkdir -p linted_output + file_list="linted_output/file_list.txt" + linted_failed=0 + for file in ${{ env.ALL_CHANGED_FILES }}; do + set +e + zhlint "$file" + if [ $? -ne 0 ]; then + linted_failed=1 + echo "$file" >> "$file_list" + output_file="linted_output/report_and_suggested_fixes/$file" + mkdir -p "$(dirname "$output_file")" + zhlint "$file" --output="$output_file" > "$output_file.log" 2>&1 + fi + set -e + done + echo "linted_failed=$linted_failed" >> "$GITHUB_ENV" + + - name: Upload Linted Markdown + uses: actions/upload-artifact@v4 + with: + name: linted-markdown + path: linted_output/ + + - name: Check lint errors + run: | + set -e + if [ "${{ env.linted_failed }}" -ne 0 ]; then + echo "Linting errors found. Please check the reports and suggested fixes in uploaded artifact." + exit 1 + fi diff --git a/docs/docker-ce.md b/docs/docker-ce.md index 9e5ecbf..74d0514 100644 --- a/docs/docker-ce.md +++ b/docs/docker-ce.md @@ -54,7 +54,7 @@ const SUDO = !root ? 'sudo ' : ''; ${SUDO}apt install -y gnupg ca-certificates # 配置 GPG 公钥 -install -m 0755 -d /etc/apt/keyrings +${SUDO}install -m 0755 -d /etc/apt/keyrings curl -fsSL https://download.docker.com/linux/${version}/gpg | ${SUDO}gpg --dearmor -o /etc/apt/keyrings/docker.gpg ${SUDO}chmod a+r /etc/apt/keyrings/docker.gpg diff --git a/hust-mirrors b/hust-mirrors new file mode 160000 index 0000000..a260713 --- /dev/null +++ b/hust-mirrors @@ -0,0 +1 @@ +Subproject commit a2607135b532ca3cd89918a4ff3896b05733ee35 diff --git a/i18n/en/docusaurus-plugin-content-blog/2024/02-22-change.md b/i18n/en/docusaurus-plugin-content-blog/2024/02-22-change.md new file mode 100644 index 0000000..68460ee --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-blog/2024/02-22-change.md @@ -0,0 +1,16 @@ + +--- +title: Mirror Change Notice +authors: chengzi +--- +In order to make better use of the limited storage space,we have made the following adjustments to the mirror station. + +The following mirror images have been added: +- termux + +Delete the following mirror images: +- loongson + + + + diff --git a/i18n/en/docusaurus-plugin-content-blog/2024/03-12-change.md b/i18n/en/docusaurus-plugin-content-blog/2024/03-12-change.md new file mode 100644 index 0000000..10532a0 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-blog/2024/03-12-change.md @@ -0,0 +1,11 @@ + +--- +title: Mirror Change Notice +authors: chengzi +--- +To make full use of limited space,we have made the following adjustments to the Hust Mirrors Station. +Delete the following mirror images: + +- AOSP +- git-repo +- gcc.git diff --git a/i18n/en/docusaurus-plugin-content-blog/2024/03-28-change.md b/i18n/en/docusaurus-plugin-content-blog/2024/03-28-change.md new file mode 100644 index 0000000..1e072fb --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-blog/2024/03-28-change.md @@ -0,0 +1,17 @@ + +--- +title: Mirror Change Notice +authors: chengzi +--- + +In order to make better use of the limited storage space, we have made the following adjustments to the mirror station. + +Since the new version of Raspberry Pi debian completely adopts the debian software source, we delete the following images: + +- raspbian +- raspberrypi +- raspbian-addons + +At the same time,the official source of debian already contains non-free software, We delete the following mirror images: + +- debian-nonfree diff --git a/i18n/en/docusaurus-plugin-content-blog/2024/05-07-public-open.md b/i18n/en/docusaurus-plugin-content-blog/2024/05-07-public-open.md new file mode 100644 index 0000000..2aa52b4 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-blog/2024/05-07-public-open.md @@ -0,0 +1,18 @@ + + +--- +title:Hello.Internet friends! +authors:chengzi +--- +From the original nginx autoindex to today's complete web service;from the initial internal use by more than a dozen people to today's public service; + +From the initial four or five mirror synchronizations to today's dozens of mirror synchronizations; + +From the initial hundreds of GB of storage to today's dozens of TB of storage. + +After a year of testing and improvement,our mirror station is finally officially open to public!:joy: + +Now,our mirror station has finally become a real "mirror station",providing more convenient services for the majority of Internet users. +You can access our mirror station anywhere in the world to download the software package,mirrors,source code warehouses,etc you need. + +**At the same time,we have abandoned the old domain name mirrors.hust.college and only retained the service of mirrors.hust.edu.cn. Please update it.** diff --git a/i18n/en/docusaurus-plugin-content-blog/2024/06-26-maintain.md b/i18n/en/docusaurus-plugin-content-blog/2024/06-26-maintain.md new file mode 100644 index 0000000..1a130e8 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-blog/2024/06-26-maintain.md @@ -0,0 +1,31 @@ + + +--- +title:Service Maintenance Notice +authors:chengzi +--- + +From June 26 to July 10,we will make large-scale adjustments to the storage space of the mirror station,mainly including the expansion of disk arrays and data migration. +During this period,the service may be unstable,and some mirror sources may not be updated in time,or even inaccessible.Please prepare in advance and replace other backup sources. + +We will complete the maintenance work as soon as possible. Please forgive the inconvenience caused to you. + +<--!truncate --> + +The mirror sources that may be affected during this period are: + +- pypi +- deepin +- deppin-cd +- openkylin-cdimage +- anolis +- ubuntukylin +- ubuntukylin-cdimage +- virtualbox +- buildroot +- gnu +- CPAN +- alpine +- crates.io-index +- crates +- Rustup