Fixes the script's escaption in staleness checker #3559
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright 2020-2023 Alibaba Group Holding Limited. | |
# | |
# Licensed 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: Vineyard Docs | |
on: | |
push: | |
branches: | |
- main | |
- docs | |
- dev/docs | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.repository }}-${{ github.event.number || github.head_ref || github.sha }}-${{ github.workflow }} | |
cancel-in-progress: true | |
env: | |
CMAKE_C_COMPILER_LAUNCHER: ccache | |
CMAKE_CXX_COMPILER_LAUNCHER: ccache | |
jobs: | |
docs: | |
runs-on: ${{ matrix.os }} | |
if: ${{ github.repository == 'v6d-io/v6d' }} | |
strategy: | |
matrix: | |
os: [ubuntu-20.04] | |
permissions: | |
issues: write | |
pull-requests: write | |
contents: write | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
repository: ${{ github.event.pull_request.head.repo.full_name }} | |
ref: ${{ github.event.pull_request.head.ref }} | |
submodules: true | |
- name: Generate Summary for Submodules | |
run: | | |
git submodule > git-modules.txt | |
cat git-modules.txt | |
- name: Cache for cccahe | |
uses: actions/cache@v3 | |
with: | |
path: ~/.ccache | |
key: ${{ matrix.os }}-docs-cache-${{ hashFiles('**/git-modules.txt') }} | |
restore-keys: | | |
${{ matrix.os }}-docs-cache- | |
- name: Install dependencies | |
run: | | |
# install dependencies | |
sudo apt update -y | |
sudo apt install -y ca-certificates \ | |
ccache \ | |
cmake \ | |
doxygen \ | |
libboost-all-dev \ | |
libcurl4-openssl-dev \ | |
libgflags-dev \ | |
libgoogle-glog-dev \ | |
libgmock-dev \ | |
libgrpc-dev \ | |
libgrpc++-dev \ | |
libkrb5-dev \ | |
libmpich-dev \ | |
libprotobuf-dev \ | |
librdkafka-dev \ | |
libgsasl7-dev \ | |
librdkafka-dev \ | |
libssl-dev \ | |
libunwind-dev \ | |
libxml2-dev \ | |
libz-dev \ | |
lsb-release \ | |
pandoc \ | |
protobuf-compiler-grpc \ | |
python3-pip \ | |
uuid-dev \ | |
wget | |
# install apache-arrow | |
wget https://apache.jfrog.io/artifactory/arrow/$(lsb_release --id --short | tr 'A-Z' 'a-z')/apache-arrow-apt-source-latest-$(lsb_release --codename --short).deb | |
sudo apt install -y -V ./apache-arrow-apt-source-latest-$(lsb_release --codename --short).deb | |
sudo apt update | |
sudo apt install -y libarrow-dev=12.0.1-1 | |
- name: Generate docs | |
run: | | |
bash .github/build-docs.sh | |
- name: Commit Doc | |
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' && github.repository == 'v6d-io/v6d' }} | |
run: | | |
git config user.name "github-actions[bot]" | |
git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
git branch -D gh-pages || true | |
git checkout --orphan gh-pages | |
shopt -s extglob | |
rm -rf !(docs) | |
rm -rf .github .clang-format .gitattributes .gitmodules .gitignore | |
mv docs/_build/html/* ./ | |
mv docs/_build/html/.nojekyll ./ | |
rm -rf docs | |
git add -A | |
git commit -m "Generate latest docs on CI, from commit ${{ github.sha }}." | |
git push -f origin gh-pages |