Skip to content
Permalink
Browse files
Update manual-deploy-website.yml
  • Loading branch information
morningman-cmy committed Jan 10, 2022
1 parent c5b9711 commit fd53e5cafabcc8b1445f23ff6d36b031902b51a7
Showing 1 changed file with 20 additions and 3 deletions.
@@ -23,19 +23,37 @@ jobs:
- name: Build
run: |
git clone https://github.com/apache/incubator-doris.git incubator-doris
git checkout ${{ github.event.inputs.branch }}
export BRANCH=${{ github.event.inputs.branch }}
cp -R blogs/zh-CN/ incubator-doris/docs/zh-CN/article/articles/
cp -R blogs/en/ incubator-doris/docs/en/article/articles/
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' }}
run: |
git fetch
git checkout -b asf-site remotes/origin/asf-site
/bin/bash remove-non-reserved-dir.sh
cp -r incubator-doris/docs/.vuepress/dist/* ./
rm -rf incubator-doris/
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add .
git commit -m "Automated deployment with doris master"
git push --verbose "https://${{ secrets.GITHUB_TOKEN }}@github.com/apache/incubator-doris-website.git" asf-site:asf-site
- name: Deploy Branch
if: ${{ github.event.inputs.branch != 'master' }}
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
@@ -45,4 +63,3 @@ jobs:
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 }}'

0 comments on commit fd53e5c

Please sign in to comment.