Skip to content

Commit 7dcf3d9

Browse files
committed
Fix
1 parent d1951c4 commit 7dcf3d9

14 files changed

+21
-22
lines changed

.github/workflows/mkdocs.yml

+8-12
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,15 @@ jobs:
1010
name: Deploy docs
1111
runs-on: ubuntu-latest
1212

13-
strategy:
14-
matrix:
15-
language: ['en', 'cn']
16-
1713
steps:
1814
- name: Checkout main
1915
uses: actions/checkout@v2
2016

21-
- name: Deploy docs
22-
uses: mhausenblas/mkdocs-deploy-gh-pages@master
23-
env:
24-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
25-
CUSTOM_DOMAIN: docs.freeflarum.com
26-
CONFIG_FILE: docs/${{ matrix.language }}.yml
27-
EXTRA_PACKAGES: build-base
28-
REQUIREMENTS: requirements.txt
17+
- name: Build docs
18+
run: bash deploy.sh
19+
20+
- name: Deploy to GitHub Pages 🚀
21+
uses: peaceiris/actions-gh-pages@v3
22+
with:
23+
github_token: ${{ secrets.GITHUB_TOKEN }}
24+
publish_dir: build

deploy.sh

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
#!/bin/bash
22
cd "$(dirname "$0")"
3-
43
[ ! -d "env" ] && python -m venv env
54

65

76
source env/bin/activate
87
pip install -r requirements.txt
98

10-
python -m mkdocs gh-deploy --force -f docs/en.yml
11-
python -m mkdocs gh-deploy --force -f docs/cn.yml
129

10+
for f in ./docs/*.yml
11+
do
12+
python -m mkdocs build -f "$f"
13+
done

docs/en.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ theme:
99
custom_dir: '../overrides/'
1010
logo: assets/images/logo.svg
1111
favicon: assets/images/favicon.ico
12+
language: en
1213

1314
palette:
1415
- media: "(prefers-color-scheme: light)"
@@ -38,8 +39,8 @@ extra:
3839
lang: en
3940

4041
- name: Chinese
41-
link: /en/
42-
lang: en
42+
link: /zh/
43+
lang: zh
4344

4445

4546
markdown_extensions:

docs/cn.yml docs/zh.yml

+6-5
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
site_name: 'Documentation'
22
site_url: https://docs.freeflarum.com/
3-
docs_dir: '../docs/cn'
4-
site_dir: '../build/cn'
3+
docs_dir: '../docs/zh'
4+
site_dir: '../build/zh'
55

66

77
theme:
88
name: material
99
custom_dir: '../overrides/'
1010
logo: assets/images/logo.svg
1111
favicon: assets/images/favicon.ico
12+
language: zh
1213

1314
palette:
1415
- media: "(prefers-color-scheme: light)"
@@ -38,8 +39,8 @@ extra:
3839
lang: en
3940

4041
- name: Chinese
41-
link: /cn/
42-
lang: cn
42+
link: /zh/
43+
lang: zh
4344

4445

4546
markdown_extensions:
@@ -50,6 +51,6 @@ markdown_extensions:
5051

5152
plugins:
5253
- search:
53-
lang: cn
54+
lang: zh
5455

5556
repo_url: https://github.com/FreeFlarum/freeflarum.com

docs/cn/about.md docs/zh/about.md

File renamed without changes.
File renamed without changes.
File renamed without changes.

docs/cn/faq.md docs/zh/faq.md

File renamed without changes.

docs/cn/index.md docs/zh/index.md

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)