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 2022/12/19 22:14:17 UTC

[avro] branch avro-3686-asf.yaml-docs updated (aab03754d -> 4e437daae)

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

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


 discard aab03754d a
 discard 0b8e92591 AVRO-3686: [Site] Add GHA workflow that builds the site
     new 4e437daae AVRO-3686: [Site] Add GHA workflow that builds the site

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   (aab03754d)
            \
             N -- N -- N   refs/heads/avro-3686-asf.yaml-docs (4e437daae)

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:
 .asf.yaml | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)


[avro] 01/01: AVRO-3686: [Site] Add GHA workflow that builds the site

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

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

commit 4e437daaed64c4c6363eab9ff55f921938b6d7ed
Author: Martin Tzvetanov Grigorov <mg...@apache.org>
AuthorDate: Tue Dec 20 00:06:33 2022 +0200

    AVRO-3686: [Site] Add GHA workflow that builds the site
    
    Signed-off-by: Martin Tzvetanov Grigorov <mg...@apache.org>
---
 .asf.yaml                   |  6 ++++
 .github/workflows/docs.yaml | 85 +++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 91 insertions(+)

diff --git a/.asf.yaml b/.asf.yaml
index c5838695f..4354d9eda 100644
--- a/.asf.yaml
+++ b/.asf.yaml
@@ -48,3 +48,9 @@ notifications:
   # Send individual PR comments/reviews to issues@
   pullrequests_comment: issues@avro.apache.org
   jira_options: link label worklog
+
+staging:
+  whoami: site-staging
+
+publish:
+  whoami: site-production
diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml
new file mode 100644
index 000000000..ea24337f7
--- /dev/null
+++ b/.github/workflows/docs.yaml
@@ -0,0 +1,85 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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
+#
+#     https://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.
+# For most projects, this workflow file will not need changing; you simply need
+# to commit it to your repository.
+
+name: Deploy ASF site
+
+on:
+  push:
+    branches:
+#      - master
+      - "avro-3686-asf.yaml-docs"
+    tags-ignore:
+      - "release-**-rc**"
+
+concurrency:
+  group: ${{ github.workflow }}-${{ github.ref }}
+  cancel-in-progress: true
+
+jobs:
+  build-docs:
+    runs-on: ubuntu-20.04
+    steps:
+      - name: Set target branch
+        id: target-branch
+        run: |
+          set -x
+          if test '${{ github.ref }}' = 'refs/heads/avro-3686-asf.yaml-docs'; then
+            echo "value=site-staging" >> $GITHUB_OUTPUT
+          elif test '${{ github.ref_type }}' = 'tag'; then
+            echo "value=site-production" >> $GITHUB_OUTPUT
+          else
+            echo "Unsupported input: ${{ github.ref }} / ${{ github.ref_type }}"
+            exit 1
+          fi
+      - name: Checkout docs sources
+        uses: actions/checkout@v3
+        with:
+          submodules: recursive
+      - name: Checkout docs target branch
+        uses: actions/checkout@v3
+        with:
+          fetch-depth: 0
+          ref: ${{ steps.target-branch.outputs.value }}
+          path: docs-target
+
+      - name: Setup Hugo
+        uses: peaceiris/actions-hugo@v2
+        with:
+          hugo-version: 0.108.0
+          extended: true
+      - name: Build docs
+        run: |
+          set -x
+          cd doc
+          hugo --minify --destination ../output
+      # TODO build the C/C++/C# docs
+      - name: Copy & push the generated HTML
+        run: |
+          set -x
+          cd docs-target
+          # delete anything but: 1) '.'; 2) '..'; 3) .git/
+          find ./ | grep -vE "^./$|^../$|^./.git" | xargs rm -rf
+          cp ../.asf.yaml .
+          cp -r ../docs/public/* .
+          # TODO copy the C/C++/C# docs
+          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