diff --git a/.github/workflows/sync-docs.yml b/.github/workflows/sync-docs.yml index f146e232e9dbb38f2c5de93d46c146e9cc22b1c1..bded520d9162d807a1078b5484ac0264f0c893d4 100644 --- a/.github/workflows/sync-docs.yml +++ b/.github/workflows/sync-docs.yml @@ -18,7 +18,7 @@ jobs: - name : Sync uses : JamesIves/github-pages-deploy-action@4.1.7 with : - branch : master # action 应该部署到的分支 。 + branch : main # action 应该部署到的分支 。 folder : site_docs #操作应该部署的文件夹 。 clean: false repository-name: jdf2e/nutui-docs diff --git a/scripts/copy-docs.js b/scripts/copy-docs.js index bd54708414732704541bc7f28a4d370af0a08d80..ca3ca91e197c1a0b6d243a1d6c4e99854e0545b9 100644 --- a/scripts/copy-docs.js +++ b/scripts/copy-docs.js @@ -37,11 +37,17 @@ const copy = async () => { if (item.show) { let cmpName = item.name.toLowerCase() let docpath = `src/packages/${cmpName}/doc.md` + let docENpath = `src/packages/${cmpName}/doc.en-US.md` fse.readFile(docpath, (err, data) => { if (!err) { copyFile(docpath, `${targetBaseUrl}/docs/${cmpName}/doc.md`) } }) + fse.readFile(docENpath, (err, data) => { + if (!err) { + copyFile(docpath, `${targetBaseUrl}/docs/${cmpName}/doc.en-US.md`) + } + }) } }) })