Skip to content

Build the website #1524

Build the website

Build the website #1524

name: "Build the website"
on:
workflow_dispatch: # This allows manual trigger from the UI
# Most pushes to main come from automation authenticated with GITHUB_TOKEN
# (the auto-merged `auto-results/*` PRs and the daily ClickHouse Cloud
# commit). GitHub does not emit workflow-triggering events for those, so the
# `push` trigger below only fires for human pushes. The schedule makes sure
# the site picks up automated results as well.
schedule:
- cron: '25 * * * *'
push:
branches:
- main
permissions:
contents: write
# The scheduled run and a push run must not race on `git push`.
concurrency:
group: generate-results
jobs:
build:
runs-on: ubuntu-latest
env:
CI_COMMIT_MESSAGE: "[bot] Build the website"
CI_COMMIT_AUTHOR: github
steps:
- uses: actions/checkout@v3
- if: github.event.commits[0].message != env.CI_COMMIT_MESSAGE
run: |
bash generate-results.sh
cd hardware && bash generate-results.sh && cd -
git config --global user.name "${{ env.CI_COMMIT_AUTHOR }}"
git config --global user.email "${{ env.CI_COMMIT_AUTHOR }}@users.noreply.github.com"
git add -A
if git status | grep -q modified
then
git commit -m "${{ env.CI_COMMIT_MESSAGE }}"
# Results can land between the checkout and the push.
git pull --rebase
git push
fi