Skip to content

Commit

Permalink
feat(doc): i18n & deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
Oc1S committed Aug 30, 2024
1 parent 5ce3fef commit c46591e
Show file tree
Hide file tree
Showing 7 changed files with 70 additions and 7 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: 部署到 GitHub Pages

on:
push:
branches:
- gh-pages
# 如果你想要进一步定义触发、路径以及其他内容,请检阅 Github Actions 文档
# https://docs.github.com/zh/actions/using-workflows/workflow-syntax-for-github-actions#on

jobs:
build:
name: 构建 Docusaurus
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: 18
cache: yarn

- name: 安装依赖
run: yarn install --frozen-lockfile
- name: 构建网站
run: yarn build

- name: 上传构建制品
uses: actions/upload-pages-artifact@v3
with:
path: apps/docs/build

deploy:
name: 部署到 GitHub Pages
needs: build

# 给予 GITHUB_TOKEN 进行 Pages 部署所必须的权限
permissions:
pages: write # 以部署到 Pages
id-token: write # 以验证部署来自恰当的源

# 部署到 Github Pages 环境
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

runs-on: ubuntu-latest
steps:
- name: 部署到 GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
4 changes: 2 additions & 2 deletions apps/docs/i18n/en/code.json
Original file line number Diff line number Diff line change
Expand Up @@ -298,8 +298,8 @@
"Focus on UX": {
"message": "Focus on UX"
},
"Meticulously optimized to ensure each scratch card interaction is smooth as silk, providing users with an unprecedented interactive experience.": {
"message": "Meticulously optimized to ensure each scratch card interaction is smooth as silk, providing users with an unprecedented interactive experience."
"Meticulously optimized to ensure each scratch is smooth as silk, providing an unprecedented interactive experience.": {
"message": "Meticulously optimized to ensure each scratch is smooth as silk, providing an unprecedented interactive experience."
},
"Fully functional": {
"message": "Fully functional"
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/i18n/zh-Hans/code.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"Focus on UX": {
"message": "关注用户体验"
},
"Meticulously optimized to ensure each scratch card interaction is smooth as silk, providing users with an unprecedented interactive experience.": {
"Meticulously optimized to ensure each scratch is smooth as silk, providing an unprecedented interactive experience.": {
"message": "经过精心优化,确保每一次刮卡都如丝般顺滑,带给用户前所未有的互动体验"
},
"Fully functional": {
Expand Down
4 changes: 2 additions & 2 deletions apps/docs/src/features/home/ComponentFeatures/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ const FeatureList: FeatureItem[] = [
),
description: (
<Translate>
Meticulously optimized to ensure each scratch card interaction is smooth as silk, providing
users with an unprecedented interactive experience.
Meticulously optimized to ensure each scratch is smooth as silk, providing an unprecedented
interactive experience.
</Translate>
),
},
Expand Down
Binary file removed apps/docs/static/img/docusaurus.png
Binary file not shown.
1 change: 0 additions & 1 deletion apps/docs/static/img/logo.svg

This file was deleted.

15 changes: 14 additions & 1 deletion apps/docs/tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,18 @@ module.exports = {
},
},
darkMode: 'class',
plugins: [nextui()],
plugins: [
nextui({
themes: {
dark: {
colors: {
primary: {
DEFAULT: '#25c2a0',
foreground: '#000000',
},
},
},
},
}),
],
};

0 comments on commit c46591e

Please sign in to comment.