This is an automated email from the ASF dual-hosted git repository.

morningman pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-doris-website.git


The following commit(s) were added to refs/heads/master by this push:
     new 44d1ac9  Update manual-deploy-website.yml
44d1ac9 is described below

commit 44d1ac9f5249ef409cae7eed6f698362f9673c4a
Author: morningman <[email protected]>
AuthorDate: Mon Jan 10 14:41:30 2022 +0800

    Update manual-deploy-website.yml
---
 .github/workflows/manual-deploy-website.yml | 19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)

diff --git a/.github/workflows/manual-deploy-website.yml 
b/.github/workflows/manual-deploy-website.yml
index 5fa09d6..94db8b0 100644
--- a/.github/workflows/manual-deploy-website.yml
+++ b/.github/workflows/manual-deploy-website.yml
@@ -30,19 +30,34 @@ jobs:
         cp -R blogs/images/blogs/ incubator-doris/docs/.vuepress/public/images/
         cd incubator-doris/docs
         find ./ -name "*.md" -exec sed -i -e 's/!\[\(.*\)\][(]\(.*\)[)]/<img 
\:src=\"$withBase\('\''\2'\''\)\" alt=\"\1\">/g' {} \;
+        sed -i 's/en\///g' .vuepress/config.js 
+        sed -i "s/BUILDING_BRANCH\.length > 0/BUILDING_BRANCH\.length > 0 \&\& 
BUILDING_BRANCH !== 'master'/g" .vuepress/config.js
+        sed -i 's/en\///g' en/README.md
+        mv en/* ./
         npm install && npm run build
         touch .vuepress/dist/.dummy
         ls .vuepress/dist/
         export DORIS_COMMIT=`git rev-parse HEAD`
 
-    - name: Deploy
+    - name: Deploy Master
+      if ${{ github.event.inputs.branch == 'master' }}
       uses: peaceiris/actions-gh-pages@v3
       with:
         github_token: ${{ secrets.GITHUB_TOKEN }}
         publish_branch: asf-site
         publish_dir: ./incubator-doris/docs/.vuepress/dist
-        destination_dir: ${{ github.event.inputs.branch }}
         user_name: 'github-actions[bot]'
         user_email: 'github-actions[bot]@users.noreply.github.com'
         commit_message: 'Automated deployment with doris branch ${{ 
github.event.inputs.branch }}@${{ env.DORIS_COMMIT }}'
 
+    - name: Deploy Branch
+      if ${{ github.event.inputs.branch != 'master' }}
+      uses: peaceiris/actions-gh-pages@v3
+      with:
+        github_token: ${{ secrets.GITHUB_TOKEN }}
+        publish_branch: asf-site
+        publish_dir: ./incubator-doris/docs/.vuepress/dist
+        destination_dir: ${{ github.event.inputs.branch }}
+        user_name: 'github-actions[bot]'
+        user_email: 'github-actions[bot]@users.noreply.github.com'
+        commit_message: 'Automated deployment with doris branch ${{ 
github.event.inputs.branch }}@${{ env.DORIS_COMMIT }}'

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to