blob: d9c84ffb1a0f4d8c190a66565d4e745b155d16e8 [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 non-release website updates
on:
push:
branches:
- main
paths:
- 'site/**' # Trigger only for changes to files in the site/ folder
- '!site/_docs/**' # except for files in the site/_docs/ folder
- 'site/_docs/docker_images.md' # unless the file is site/_docs/docker_images.md
- 'site/_docs/history.md' # or site/_docs/history.md
- 'site/_docs/howto.md' # or site/_docs/howto.md
- 'site/_docs/index.md' # or site/_docs/index.md
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
- 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 reset -- avatica/javadocAggregate/ # Restore the avatica javadoc
git checkout -- avatica/javadocAggregate/
git add .
if ! git diff-index --quiet HEAD; then
git commit -m "Website deployed from calcite-avatica@$GITHUB_SHA"
git push origin main
fi