This is an automated email from the ASF dual-hosted git repository. francischuang pushed a commit to branch test-site in repository https://gitbox.apache.org/repos/asf/calcite.git
commit 8bd17465a458f1c2c698e6d45353484bbee39f0e Author: Francis Chuang <[email protected]> AuthorDate: Wed Aug 14 10:44:09 2019 +1000 Try Github actions --- .github/workflows/generate-javadoc.yml | 36 ++++++++++++++++++++++++++++++++++ .github/workflows/publish-site.yml | 34 ++++++++++++++++++++++++++++++++ 2 files changed, 70 insertions(+) diff --git a/.github/workflows/generate-javadoc.yml b/.github/workflows/generate-javadoc.yml new file mode 100644 index 0000000..a7df13b --- /dev/null +++ b/.github/workflows/generate-javadoc.yml @@ -0,0 +1,36 @@ +name: Publish the javadoc + +on: + create: + tags: + - "*" + +jobs: + publish: + name: Publish javadoc + runs-on: ubuntu-latest + steps: + - name: Generate Javadoc only if the tag is a release + env: + TAG: ${{ github.event.ref }} + run: if [[ ! $TAG =~ ^calcite-[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+$ ]]; then touch /tmp/exit; fi + - name: Checking out Calcite repository + uses: actions/checkout@v1 + - name: Generate javadoc + working-directory: site + run: | + if [[ -f /tmp/exit ]]; then exit 0; fi + docker-compose run -u $(id -u):$(id -g) generate-javadoc + - name: Deploy javadoc to calcite-site repository + working-directory: site + run: | + if [[ -f /tmp/exit ]]; then exit 0; fi + git config --global user.email "[email protected]" + git config --global user.name "Calcite Automated Website Build" + git clone --depth 1 --branch asf-site https://gitbox.apache.org/repos/asf/calcite-site.git deploy + cd deploy/ + rm -rf apidocs/ testapidocs/ + cp -r ../target/* . + git add . + git commit -m "Automatic javadoc deployment from Calcite at $GITHUB_SHA" + git push origin HEAD:asf-site \ No newline at end of file diff --git a/.github/workflows/publish-site.yml b/.github/workflows/publish-site.yml new file mode 100644 index 0000000..16b38d7 --- /dev/null +++ b/.github/workflows/publish-site.yml @@ -0,0 +1,34 @@ +name: Publish the website + +on: + push: + branches: + - test-site + +jobs: + publish: + name: Publish site + runs-on: ubuntu-latest + steps: + - name: Test printing secret + env: + GSTEIN_TEST_SECRET: ${{ secrets.GSTEIN_TEST_SECRET }} + run: echo "\$GSTEIN_TEST_SECRET is $GSTEIN_TEST_SECRET" + - name: Checking out Calcite repository + uses: actions/checkout@v1 + - name: Build site assets + working-directory: site + run: docker-compose run -e JEKYLL_UID=$(id -u) -e JEKYLL_GID=$(id -g) build-site + - name: Deploy site to calcite-site repository + working-directory: site + run: | + shopt -s extglob + git config --global user.email "[email protected]" + git config --global user.name "Calcite Automated Website Build" + git clone --depth 1 --branch asf-site https://gitbox.apache.org/repos/asf/calcite-site.git deploy + cd deploy/ + rm -rf !(apidocs|avatica|testapidocs) + cp -r ../target/* . + git add . + git commit -m "Automatic site deployment from Calcite at $GITHUB_SHA" + git push origin HEAD:asf-site \ No newline at end of file
