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

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

commit b127d048e3d50e41ae44d5954ba0227e05a81e59
Author: Martin Tzvetanov Grigorov <[email protected]>
AuthorDate: Thu Aug 22 14:00:00 2024 +0300

    [NO-JIRA][Website] Wipe out the old contents of asf-site branch
    
    and copy over only the newly generated .html files
    
    Also create a simple .asf.yaml file with `publish`
    
    Signed-off-by: Martin Tzvetanov Grigorov <[email protected]>
    
    Signed-off-by: Martin Tzvetanov Grigorov <[email protected]>
---
 .github/workflows/deploy-docs.yml | 18 ++++++++++++++----
 1 file changed, 14 insertions(+), 4 deletions(-)

diff --git a/.github/workflows/deploy-docs.yml 
b/.github/workflows/deploy-docs.yml
index 925244b40..63850a781 100644
--- a/.github/workflows/deploy-docs.yml
+++ b/.github/workflows/deploy-docs.yml
@@ -17,7 +17,7 @@
 
 
 # Sample workflow for building and deploying a Hugo site to GitHub Pages
-name: Deploy Hugo site to Pages
+name: Deploy website
 
 on:
   # Runs on pushes targeting the default branch
@@ -64,15 +64,25 @@ jobs:
           hugo \
             --gc \
             --minify \
-            --baseURL "https://avro.apache.org/";
+            --baseURL "/"
       - name: Commit new site
         run: |
           set -ex
-          mv doc/public docs/
+          mv doc/public ${{runner.temp}}/website
+          rsync \
+            -a \
+            --delete \
+            --exclude '/.git/' \
+            ${{runner.temp}}/website/ \
+            ./
+          echo "publish:
+                  whoami: asf-site
+                " > .asf.yaml
+          touch .nojekyll
           git config --global user.email "[email protected]"
           git config --global user.name "Github Actions"
           git checkout --orphan asf-site-staging
-          git add .
+          git add --all
           git commit -m "Update docs"
           git checkout asf-site
           git reset --hard asf-site-staging

Reply via email to