You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@avro.apache.org by mg...@apache.org on 2023/04/12 12:38:08 UTC

[avro] branch update-site updated (2c08c3281 -> 78b71f819)

This is an automated email from the ASF dual-hosted git repository.

mgrigorov pushed a change to branch update-site
in repository https://gitbox.apache.org/repos/asf/avro.git


 discard 2c08c3281 Update the website on changes in doc/ folder
     new 78b71f819 Update the website on changes in doc/ folder

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (2c08c3281)
            \
             N -- N -- N   refs/heads/update-site (78b71f819)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .github/workflows/docs.yaml | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)


[avro] 01/01: Update the website on changes in doc/ folder

Posted by mg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

mgrigorov pushed a commit to branch update-site
in repository https://gitbox.apache.org/repos/asf/avro.git

commit 78b71f81938792377f3e7ecb14df60a844eea4cd
Author: Martin Tzvetanov Grigorov <mg...@apache.org>
AuthorDate: Wed Apr 12 14:31:34 2023 +0300

    Update the website on changes in doc/ folder
    
    Signed-off-by: Martin Tzvetanov Grigorov <mg...@apache.org>
---
 .asf.yaml                                     |  4 ++
 .github/workflows/docs.yaml                   | 96 +++++++++++++++++++++++++++
 doc/config.toml                               |  2 +-
 doc/content/en/docs/++version++/api-c++.md    |  2 +-
 doc/content/en/docs/++version++/api-c.md      |  2 +-
 doc/content/en/docs/++version++/api-csharp.md |  2 +-
 doc/content/en/docs/++version++/api-java.md   |  2 +-
 doc/layouts/partials/navbar.html              |  2 +-
 lang/c/build.sh                               |  5 ++
 9 files changed, 111 insertions(+), 6 deletions(-)

diff --git a/.asf.yaml b/.asf.yaml
index c5838695f..c12afbf8a 100644
--- a/.asf.yaml
+++ b/.asf.yaml
@@ -48,3 +48,7 @@ notifications:
   # Send individual PR comments/reviews to issues@
   pullrequests_comment: issues@avro.apache.org
   jira_options: link label worklog
+
+publish:
+  whoami: asf-site
+  subdir: asf-site
diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml
new file mode 100644
index 000000000..a6ea0d23b
--- /dev/null
+++ b/.github/workflows/docs.yaml
@@ -0,0 +1,96 @@
+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
+          apt-get update -q
+          apt-get install -q -y gcc g++ libboost-all-dev cmake
+          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: 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
diff --git a/doc/config.toml b/doc/config.toml
index dac3f8050..ce34c5d54 100644
--- a/doc/config.toml
+++ b/doc/config.toml
@@ -263,7 +263,7 @@ url = "http://www.apache.org/security/"
 
 [[params.versions]]
   version = "++version++ (Current)"
-  url = "/docs/++version++/"
+  url = "./docs/++version++/"
 
 [[params.versions]]
   version = "1.11.0"
diff --git a/doc/content/en/docs/++version++/api-c++.md b/doc/content/en/docs/++version++/api-c++.md
index 4382750a4..909049c68 100644
--- a/doc/content/en/docs/++version++/api-c++.md
+++ b/doc/content/en/docs/++version++/api-c++.md
@@ -2,7 +2,7 @@
 title: "C++ API"
 linkTitle: "C++ API"
 weight: 102
-manualLink: /docs/++version++/api/cpp/html/
+manualLink: ./docs/++version++/api/cpp/html/
 ---
 
 <!--
diff --git a/doc/content/en/docs/++version++/api-c.md b/doc/content/en/docs/++version++/api-c.md
index 79a5209e5..032bd2283 100644
--- a/doc/content/en/docs/++version++/api-c.md
+++ b/doc/content/en/docs/++version++/api-c.md
@@ -2,7 +2,7 @@
 title: "C API"
 linkTitle: "C API"
 weight: 101
-manualLink: /docs/++version++/api/c/
+manualLink: ./docs/++version++/api/c/
 ---
 
 <!--
diff --git a/doc/content/en/docs/++version++/api-csharp.md b/doc/content/en/docs/++version++/api-csharp.md
index cfad0d1e3..e48ae8133 100644
--- a/doc/content/en/docs/++version++/api-csharp.md
+++ b/doc/content/en/docs/++version++/api-csharp.md
@@ -2,7 +2,7 @@
 title: "C# API"
 linkTitle: "C# API"
 weight: 103
-manualLink: /docs/++version++/api/csharp/html/
+manualLink: ./docs/++version++/api/csharp/html/
 ---
 
 <!--
diff --git a/doc/content/en/docs/++version++/api-java.md b/doc/content/en/docs/++version++/api-java.md
index 12d743567..3d2a494f4 100644
--- a/doc/content/en/docs/++version++/api-java.md
+++ b/doc/content/en/docs/++version++/api-java.md
@@ -2,7 +2,7 @@
 title: "Java API"
 linkTitle: "Java API"
 weight: 100
-manualLink: /docs/++version++/api/java/
+manualLink: ./docs/++version++/api/java/
 ---
 
 <!--
diff --git a/doc/layouts/partials/navbar.html b/doc/layouts/partials/navbar.html
index 98c7bf94f..03c6e4854 100644
--- a/doc/layouts/partials/navbar.html
+++ b/doc/layouts/partials/navbar.html
@@ -25,7 +25,7 @@
 {{/* AVRO-3555: Don't inline the existing logo for now.
 		<span class="navbar-logo">{{ if .Site.Params.ui.navbar_logo }}{{ with resources.Get "icons/logo.svg" }}{{ ( . | minify).Content | safeHTML }}{{ end }}{{ end }}</span><span class="text-uppercase font-weight-bold">{{ .Site.Title }}</span>
 */}}
-		<span class="navbar-logo"><img src="/docs/++version++/logo.svg" width="100" height="30" style="margin: 0 10px"></span><span class="text-uppercase font-weight-bold">{{ .Site.Title }}</span>
+		<span class="navbar-logo"><img src="./docs/++version++/logo.svg" width="100" height="30" style="margin: 0 10px"></span><span class="text-uppercase font-weight-bold">{{ .Site.Title }}</span>
 	</a>
 	
 	<div class="td-navbar-nav-scroll ml-md-auto" id="main_navbar">
diff --git a/lang/c/build.sh b/lang/c/build.sh
index 6753e778d..5464ef3fd 100755
--- a/lang/c/build.sh
+++ b/lang/c/build.sh
@@ -69,6 +69,11 @@ do
       make -C $build_dir test
       ;;
 
+    docs)
+      prepare_build
+      make -C $build_dir docs
+      ;;
+
     dist)
       prepare_build
       cp ../../share/VERSION.txt $root_dir