blob: 82d00cc480b4d6b6b42a0cd7f0f14252e7a1445d [file] [log] [blame]
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to you under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
name: Publish website on release
on:
push:
tags:
- rel/avatica-[0-9]+.[0-9]+.[0-9]+ # Trigger only when the tag matches rel/avatica-X.Y.Z
jobs:
publish-website:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build site
working-directory: site
run: |
docker-compose run -e JEKYLL_UID=$(id -u) -e JEKYLL_GID=$(id -g) build-site
- name: Build javadoc
working-directory: site
run: |
docker-compose run generate-javadoc
- uses: actions/checkout@v3
with:
repository: apache/calcite-site
path: calcite-site
token: ${{ secrets.CALCITE_WEBSITE_BUILD }}
- name: Publish site
working-directory: calcite-site
run: |
git config user.email ${{ github.actor }}@users.noreply.github.com
git config user.name ${{ github.actor }}
rm -rf avatica/
mv ../site/target/avatica/ .
git add .
if ! git diff-index --quiet HEAD; then
git commit -m "Website deployed from calcite-avatica@$GITHUB_SHA"
git push origin main
fi