-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update the website on changes in doc/ folder
Signed-off-by: Martin Tzvetanov Grigorov <mgrigorov@apache.org>
- Loading branch information
Showing
9 changed files
with
148 additions
and
6 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,133 @@ | ||
name: Deploy Avro site | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- update-site | ||
paths: | ||
- .github/workflows/docs.yaml | ||
- doc/** | ||
- lang/c/** | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build-docs: | ||
name: Build docs | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout docs sources | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Checkout asf-site branch | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: asf-site | ||
path: asf-site | ||
|
||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
|
||
- name: Install NPM dependencies | ||
run: | | ||
set -x | ||
cd doc | ||
npm install | ||
- name: Setup Hugo | ||
uses: peaceiris/actions-hugo@v2 | ||
with: | ||
hugo-version: 0.111.3 | ||
extended: true | ||
|
||
- name: Build docs | ||
run: | | ||
set -x | ||
cd doc | ||
hugo --minify --destination ../website --baseURL=/asf-site | ||
- name: Build C docs | ||
run: | | ||
set -x | ||
sudo apt-get update -q | ||
sudo apt-get install -q -y cmake liblzma-dev libsnappy-dev libjansson-dev zlib1g-dev pkg-config asciidoc source-highlight libsource-highlight-dev | ||
pushd lang/c | ||
./build.sh clean docs | ||
popd | ||
mkdir -p website/docs/++version++/api/c/ | ||
cp -r build/c/docs/index.html website/docs/++version++/api/c/ | ||
- name: Build C++ docs | ||
run: | | ||
set -x | ||
sudo apt-get update -q | ||
sudo apt-get install -q -y gcc g++ libboost-all-dev cmake doxygen | ||
pushd lang/c++ | ||
./build.sh clean doc | ||
popd | ||
mkdir -p website/docs/++version++/api/cpp/html/ | ||
cp -r lang/c++/doc/html/* website/docs/++version++/api/cpp/html/ | ||
- name: Build C# docs | ||
run: | | ||
set -x | ||
sudo apt-get update -q | ||
sudo apt-get install -q -y wget libzstd-dev libicu-dev doxygen | ||
sudo wget https://dot.net/v1/dotnet-install.sh | ||
bash ./dotnet-install.sh --channel "7.0" --install-dir "$HOME/.dotnet" | ||
pushd lang/csharp | ||
doxygen Avro.dox | ||
mkdir -p website/docs/++version++/api/csharp/html/ | ||
cp -pr build/doc/* ../../website/docs/++version++/api/csharp/html/ | ||
popd | ||
- name: Cache Local Maven Repository | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.m2/repository | ||
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | ||
restore-keys: | | ||
${{ runner.os }}-maven- | ||
- name: Setup Temurin JDK | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'temurin' | ||
java-version: 8 | ||
|
||
- name: Build Java docs | ||
run: | | ||
set -x | ||
pushd lang/java | ||
mvn -Pdist javadoc::aggregate | ||
mkdir -p ../../website/docs/++version++/api/java/ | ||
cp -r target/apidocs/* ../../website/docs/++version++/api/java/ | ||
popd | ||
- name: Copy & push the generated HTML | ||
run: | | ||
set -x | ||
cd asf-site/ | ||
rsync \ | ||
-a \ | ||
--delete \ | ||
--exclude '/.git/' \ | ||
../website/ \ | ||
./ | ||
cp ../.asf.yaml . | ||
touch .nojekyll | ||
git status --porcelain | ||
if [ "$(git status --porcelain)" != "" ]; then | ||
git config user.name "github-actions[bot]" | ||
git config user.email "github-actions[bot]@users.noreply.github.com" | ||
git add --all | ||
git commit -m 'Publish built docs triggered by ${{ github.sha }}' | ||
git push || git push --force | ||
fi |
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
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
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
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
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
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
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