-
Notifications
You must be signed in to change notification settings - Fork 121
123 lines (110 loc) · 4.23 KB
/
docs.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
# 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