refactor: website docs **translation needed** (#9287)

Co-authored-by: wlwxj <d1ve_wh4le@outlook.com>
Co-authored-by: Rbqwow <55343783+Rbqwow@users.noreply.github.com>
Co-authored-by: Constrat <56174894+Constrat@users.noreply.github.com>
Co-authored-by: HX3N <scarlet7518@gmail.com>
Co-authored-by: Wallsman <63186641+wallsman@users.noreply.github.com>
Co-authored-by: Loong <wangl.cc@outlook.com>
Co-authored-by: 神代綺凛 <i@loli.best>
Co-authored-by: SherkeyXD <57581480+SherkeyXD@users.noreply.github.com>
This commit is contained in:
uye
2024-07-08 01:57:20 +08:00
committed by GitHub
parent 24a73759ad
commit 67bbf9aac5
288 changed files with 10256 additions and 6210 deletions

49
.github/workflows/markdown-checker.yml vendored Normal file
View File

@@ -0,0 +1,49 @@
name: Lint Markdown files
on:
push:
paths:
- "**/*.md"
- ".github/workflows/lint-markdown.yml"
pull_request:
paths:
- "**/*.md"
- ".github/workflows/lint-markdown.yml"
schedule:
- cron: "44 7 * * 2"
workflow_dispatch:
jobs:
lint:
name: Lint Markdown
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
with:
show-progress: false
- name: Lint Markdown
uses: DavidAnson/markdownlint-cli2-action@v16
with:
config: docs/.markdownlint.yaml
globs: |
README.md
docs/**/*.md
# check-links:
# name: Check Dead Links
# runs-on: ubuntu-latest
# steps:
# - name: Check out code
# uses: actions/checkout@v4
# with:
# show-progress: false
#
# - name: Check Dead Link
# uses: umbrelladocs/action-linkspector@v1
# with:
# # Use github-pr-review when triggered by a pull request; otherwise, use github-check
# reporter: ${{ github.event_name == 'pull_request' && 'github-pr-review' || 'github-check' }}
# filter_mode: nofilter
# fail_on_error: true

View File

@@ -1,53 +0,0 @@
name: Build Test for website
on:
push:
branches-ignore:
- "master"
- "dev"
paths:
- "docs/**"
- "website/**"
pull_request:
branches:
- "dev"
paths:
- "docs/**"
- "website/**"
workflow_dispatch:
jobs:
build-test:
timeout-minutes: 20
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
with:
fetch-depth: 1
show-progress: false
- name: Setup Node.js environment
uses: actions/setup-node@v4
with:
node-version: 20
- uses: pnpm/action-setup@v3
name: Install pnpm
with:
version: 9
run_install: false
- name: Install dependencies
run: pnpm install
working-directory: "./website"
- name: Build
run: pnpm run build
working-directory: "./website"
- name: Upload artifact to GitHub
uses: actions/upload-artifact@v4
with:
name: dist
path: "./website/dist"

View File

@@ -1,10 +1,19 @@
name: Deploy Website
name: MaaWebsite Workflow
on:
push:
branches:
- master
- dev
- "master"
- "dev"
paths:
- ".github/workflows/website-workflow.yml"
- "docs/**"
- "website/**"
pull_request:
paths:
- ".github/workflows/website-workflow.yml"
- "docs/**"
- "website/**"
workflow_dispatch:
inputs:
deploy-to-prod-env:
@@ -14,50 +23,59 @@ on:
type: boolean
jobs:
deploy:
build:
timeout-minutes: 20
runs-on: ubuntu-latest
env:
DO_NOT_TRACK: 1
steps:
- name: Check out code
uses: actions/checkout@v4
with:
show-progress: false
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9
run_install: false
- name: Setup Node.js environment
uses: actions/setup-node@v4
with:
node-version: 20
- uses: pnpm/action-setup@v3
name: Install pnpm
with:
version: 9
run_install: false
cache: pnpm
cache-dependency-path: './website/pnpm-lock.yaml'
- name: Install dependencies
run: pnpm install
run: pnpm install --frozen-lockfile
working-directory: "./website"
- name: Build
run: pnpm run build
working-directory: "./website"
- name: Upload artifact to GitHub
uses: actions/upload-artifact@v4
with:
name: dist
path: "./website/dist"
publish:
runs-on: ubuntu-latest
needs: build
if: github.event_name != 'pull_request'
steps:
- name: Download website artifacts
uses: actions/download-artifact@v4
with:
name: dist
- name: Set deployment environment
id: set-deployment-env
run: |
if [[ "${{ github.event_name }}" != "workflow_dispatch" ]]; then
if [[ "${{ github.ref }}" == "refs/heads/master" ]]; then
echo "AZURE_TARGET_ENV=prod" >> $GITHUB_ENV
else
echo "AZURE_TARGET_ENV=dev" >> $GITHUB_ENV
fi
if [[ "${{ github.event_name }}" != "workflow_dispatch" && "${{ github.ref }}" == "refs/heads/master" ]] || [[ "${{ github.event.inputs.deploy-to-prod-env }}" == "true" ]]; then
echo "AZURE_TARGET_ENV=prod" >> $GITHUB_ENV
else
if [[ "${{ github.event.inputs.deploy-to-prod-env }}" == "true" ]]; then
echo "AZURE_TARGET_ENV=prod" >> $GITHUB_ENV
else
echo "AZURE_TARGET_ENV=dev" >> $GITHUB_ENV
fi
echo "AZURE_TARGET_ENV=dev" >> $GITHUB_ENV
fi
- name: Show environment
@@ -71,7 +89,7 @@ jobs:
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_MAA_WEBSITE }}
repo_token: ${{ secrets.GITHUB_TOKEN }}
action: "upload"
app_location: "./website/dist"
app_location: "."
api_location: ""
skip_app_build: true
skip_api_build: true
@@ -85,7 +103,7 @@ jobs:
repo_token: ${{ secrets.GITHUB_TOKEN }}
action: "upload"
deployment_environment: dev
app_location: "./website/dist"
app_location: "."
api_location: ""
skip_app_build: true
skip_api_build: true