diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index cd2d8fe..fd0ecb2 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -38,7 +38,7 @@ jobs: - name: Setup Node uses: actions/setup-node@v4 with: - node-version: '16' + node-version: '20' - name: Cache dependencies uses: actions/cache@v3 @@ -54,11 +54,10 @@ jobs: npm install -D --save autoprefixer npm install -D --save postcss-cli npm install -D --save postcss - hugo + hugo --baseURL https://${REPO_OWNER}.github.io/${REPO_NAME} --minify - name: Deploy - uses: peaceiris/actions-gh-pages@v3 + uses: peaceiris/actions-gh-pages@v4 + if: ${{ github.ref == 'refs/heads/main' }} # <-- specify same branch as above here with: - #deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }} github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./public diff --git a/hugo.toml b/hugo.toml index 2a859b6..74206fe 100644 --- a/hugo.toml +++ b/hugo.toml @@ -1,5 +1,5 @@ # Base configuration -baseURL = "/" +baseURL = "https://huawei.github.io/css-docs/" title = "Huawei" contentDir = "content/zh-cn" defaultContentLanguage = "zh-cn" @@ -46,7 +46,7 @@ description = "Huawei Container Storage Suite" version_menu = "Releases" [[languages.en.params.versions]] version = "v4.5.0 (current)" - url = "http://8.44.188.128:1313/en/docs" + url = "https://huawei.github.io/css-docs/en/docs" [markup] [markup.goldmark] @@ -80,7 +80,7 @@ showLightDarkModeMenu = false [[params.versions]] version = "v4.5.0(当前版本)" - url = "http://8.44.188.128:1313/docs" + url = "https://huawei.github.io/css-docs/docs" [[menu.main]] name = "GitHub" @@ -97,32 +97,3 @@ showLightDarkModeMenu = false url = "https://github.com/Huawei/eSDK_K8S_Plugin" icon = "fab fa-github" desc = "Development takes place here!" - -[module] - proxy = "direct" - [[module.imports]] - path = "github.com/google/docsy" - disable = false - [[module.mounts]] - source = "content/en" - target = "content" - lang = "en" - [[module.mounts]] - source = "content/zh-cn" - target = "content" - lang = "zh-cn" - [[module.mounts]] - source = "static" - target = "static" - [[module.mounts]] - source = "layouts" - target = "layouts" - [[module.mounts]] - source = "data" - target = "data" - [[module.mounts]] - source = "assets" - target = "assets" - [[module.mounts]] - source = "archetypes" - target = "archetypes" \ No newline at end of file