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 11:33:08 UTC

[avro] branch update-site created (now 14fca0bc0)

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


      at 14fca0bc0 Update the website on changes in doc/ folder

This branch includes the following new commits:

     new 14fca0bc0 Update the website on changes in doc/ folder

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.



[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 14fca0bc0d13adff85f5ed5980a9f2d2d49aa4e9
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 | 71 +++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 75 insertions(+)

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..74bea23bb
--- /dev/null
+++ b/.github/workflows/docs.yaml
@@ -0,0 +1,71 @@
+name: Deploy Avro site
+
+on:
+  push:
+    branches:
+      - master
+      - update-site
+    paths:
+      - .github/workflows/docs.yaml
+      - doc/**
+
+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
+
+      - 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: 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