n3nash commented on a change in pull request #1706:
URL: https://github.com/apache/hudi/pull/1706#discussion_r438898630
##########
File path: .github/workflows/web.yml
##########
@@ -0,0 +1,51 @@
+name: web sync
+
+on:
+ issue_comment:
+ types: [created]
+
+jobs:
+ bot:
+ runs-on: ubuntu-latest
+ if: ${{ github.event.comment.body == 'sync testing site' }}
+
+ steps:
+ - name: clone repository
+ uses: actions/checkout@v2
+ with:
+ fetch-depth: 0
+
+ - name: fetch pull request branch
+ run: |
+ git fetch origin +refs/pull/${{ github.event.issue.number }}/merge
+ git checkout FETCH_HEAD
+
+ siteRef=`git show-ref --hash --verify refs/remotes/origin/asf-site`
+ pullRef=`git log -1 --pretty=format:"%P" -1`
+ if [[ $pullRef =~ $siteRef ]]
+ then
+ exit 0;
+ else
+ exit -1;
+ fi
+
+ - name: jekyll docker build
+ run: |
+ docker run \
+ --privileged=true \
+ -v ${{ github.workspace }}/docs:/srv/jekyll/docs \
+ -v ${{ github.workspace }}/_site:/srv/jekyll/docs/_site \
+ jekyll/jekyll:3.8 \
+ /bin/bash -c "chmod 777 -R /srv/jekyll && cd /srv/jekyll/docs && gem
sources -l && bundle install && bundle exec jekyll build --config
_config.yml,_config.testing.yml"
+
+ - name: push test site
+ run: |
+ git clone https://${{ secrets.HUDI_GITHUB_WEB_TOKEN
}}@github.com/ApacheHudi/hudi-testing-site
Review comment:
Do we already have this branch ?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]