-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Filter out community content and support bilingual (#2314)
- Loading branch information
1 parent
ca93141
commit cdac749
Showing
698 changed files
with
36,360 additions
and
13,984 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: deploy-all | ||
|
||
on: | ||
push: | ||
paths-ignore: | ||
- 'docs-2.0-zh/**' | ||
- 'docs-2.0-en/**' | ||
branches: | ||
# Remember to add v before the following version number unless the version is master. | ||
- v3.6.0 | ||
|
||
jobs: | ||
deploy-zh: | ||
uses: ./.github/workflows/deploy-zh.yml | ||
secrets: | ||
ZHSITE_PASSWORD: ${{ secrets.ZHSITE_PASSWORD }} | ||
|
||
deploy-en: | ||
uses: ./.github/workflows/deploy-en.yml |
24 changes: 14 additions & 10 deletions
24
.github/workflows/deploy.yml → .github/workflows/deploy-en.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
name: Publish Chinese docs via GitHub Pages and upload to server | ||
env: | ||
# Remember to add v before the following version number unless the version is master. | ||
ACTIONTEST: 3.6.0 | ||
on: | ||
workflow_call: | ||
secrets: | ||
ZHSITE_PASSWORD: | ||
required: true | ||
push: | ||
branches: | ||
- v3.6.0 | ||
paths: | ||
- 'docs-2.0-zh/**' | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 1 # fetch all commits/branches for gitversion | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.8' | ||
|
||
- name : prepare | ||
run: sh ./prepare.sh | ||
|
||
- name: Git Config | ||
run: git config user.name ChrisChen2023 && git config user.email [email protected] | ||
|
||
- name: save tmp file | ||
run: | | ||
cp -f *versions.json /tmp/ | ||
ls /tmp/ -ltr | ||
- name: Mike Deploy | ||
run: | | ||
python ./scripts/render_chinese_only.py | ||
git fetch origin gh-pages-zh --depth=1 # fix mike's CI update | ||
mike list | ||
mike deploy ${{ env.ACTIONTEST }} -b gh-pages-zh -p --rebase | ||
mike set-default ${{ env.ACTIONTEST }} -b gh-pages-zh -p --rebase | ||
mike list | ||
- name: show Chinese git branches | ||
run: | | ||
git branch | ||
git checkout . | ||
git checkout gh-pages-zh | ||
- name: add existing version | ||
run: | | ||
import yaml, json | ||
new_content = {"version": "${{ env.ACTIONTEST }}", "title": "${{ env.ACTIONTEST }}", "aliases": []} | ||
filename = "/tmp/community_versions.json" | ||
with open(filename, 'r') as infile: | ||
json_data = json.load(infile) | ||
found = False | ||
for item in json_data: | ||
if item['version'] == new_content['version']: # in case duplicate master branch | ||
found = True | ||
break | ||
if not found: | ||
json_data.append(new_content) | ||
json_data = sorted(json_data, key=lambda x: x['version'], reverse=True) | ||
with open('./versions.json', 'w') as outfile: | ||
json.dump(json_data, outfile, indent=2) | ||
shell: python | ||
|
||
- name: Compress | ||
run: | | ||
tar -vczf nebula-docs.tar.gz ${{ env.ACTIONTEST }} versions.json *.html | ||
- name: Transfer | ||
uses: appleboy/scp-action@master | ||
with: | ||
host: 47.99.143.59 | ||
username: root | ||
password: ${{ secrets.ZHSITE_PASSWORD }} | ||
port: 404 | ||
source: nebula-docs.tar.gz | ||
target: /usr/web/ | ||
|
||
- name: UnCompress | ||
uses: appleboy/ssh-action@master | ||
with: | ||
host: 47.99.143.59 | ||
username: root | ||
password: ${{ secrets.ZHSITE_PASSWORD }} | ||
port: 404 | ||
script: | | ||
mkdir -p /usr/web/nebula-docs/ | ||
tar -xzf /usr/web/nebula-docs.tar.gz -C /usr/web/nebula-docs/ | ||
# mkdir -p /usr/web/nebula-docs/site/pdf/ | ||
# cp -f /var/www/ent-docs/${{ env.ACTIONTEST }}/pdf/NebulaGraph-CN.pdf /var/www/ent-docs/site/pdf/NebulaGraph-CN.pdf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[{"version": "3.6.0", "title": "3.6.0", "aliases": []},{"version": "3.5.0", "title": "3.5.0", "aliases": []},{"version": "3.4.3", "title": "3.4.3", "aliases": []},{"version": "3.4.2", "title": "3.4.2", "aliases": []},{"version": "3.4.1", "title": "3.4.1", "aliases": []}, {"version": "3.4.0", "title": "3.4.0", "aliases": []}, {"version": "3.3.0", "title": "3.3.0", "aliases": []}, {"version": "3.2.1", "title": "3.2.1", "aliases": []}, {"version": "3.1.3", "title": "3.1.3", "aliases": []}, {"version": "3.0.2", "title": "3.0.2", "aliases": []}, {"version": "2.6.2", "title": "2.6.2", "aliases": []}, {"version": "master", "title": "master", "aliases": []}] |
2 changes: 1 addition & 1 deletion
2
.../1.introduction/1.what-is-nebula-graph.md → .../1.introduction/1.what-is-nebula-graph.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.