Skip to content

Commit

Permalink
工作流
Browse files Browse the repository at this point in the history
  • Loading branch information
sumingcheng committed Dec 10, 2024
1 parent 57e594a commit 2a4a8dd
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 3 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Deploy to GitHub Pages

on:
push:
branches:
- main

jobs:
deploy:
name: Deploy to GitHub Pages
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
cache: npm

- name: Install dependencies
run: npm ci

- name: Build website
run: npm run build

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./build
6 changes: 3 additions & 3 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const config = {
onBrokenLinks: "throw",
onBrokenMarkdownLinks: "warn",

// 即使不使用国际化,也必须在此设置有用的元数据
// 即使不使���国际化,也必须在此设置有用的元数据
// 例如,中文网站可将"en"替换为"zh-CN"
i18n: {
defaultLocale: "zh-CN",
Expand Down Expand Up @@ -173,11 +173,11 @@ const config = {
searchPagePath: "search",
contextualSearch: true,
searchParameters: {
hitsPerPage: 8, // 每页显示结果数
hitsPerPage: 8,
},
replaceSearchResultPathname: {
from: '/docs-hub/',
to: '/',
to: '/docs-hub/',
},
},
prism: {
Expand Down

0 comments on commit 2a4a8dd

Please sign in to comment.