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

kranti pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/iggy-website.git


The following commit(s) were added to refs/heads/main by this push:
     new edf73c68d Update deploy.yml workflow
edf73c68d is described below

commit edf73c68d45c4a2b6090b292087a4e8e2b7e3783
Author: kparisa <[email protected]>
AuthorDate: Sun Feb 9 22:41:46 2025 -0800

    Update deploy.yml workflow
---
 .github/workflows/deploy.yml | 31 +++++++++----------------------
 1 file changed, 9 insertions(+), 22 deletions(-)

diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml
index b150f42d1..23d4c1a0c 100644
--- a/.github/workflows/deploy.yml
+++ b/.github/workflows/deploy.yml
@@ -17,32 +17,19 @@ jobs:
         run: |
           npm install
 
-      - name: Build Iggy Website
+      - name: Build Apache Iggy Website
         run: |
           npm run build
 
       - name: Copy ASF config
         run: |
           cp .asf.yaml build/.asf.yaml  # Ensure .asf.yaml is inside build 
directory
-          ls -la build/  # Debugging step to confirm file is present
 
-      - name: Deploy to asf-site
-        run: |
-          git config --global user.name "github-actions"
-          git config --global user.email "[email protected]"
-          git checkout --orphan asf-site
-          git rm -rf .
-          mv build/* .
-          ls -la #debugging for .asf.yaml file
-          rm -rf build
-          ls -la #debugging for .asf.yaml file
-
-          # Ensure .asf.yaml is present before commit
-          if [ ! -f ".asf.yaml" ]; then
-            echo "ERROR: .asf.yaml is missing!"
-            exit 1
-          fi
-
-          git add .
-          git commit -m "Deploy updated Apache Iggy site"
-          git push --force origin asf-site
\ No newline at end of file
+      # Publish to asf-site for production
+      - name: Publish Iggy Website to asf-site
+        if: github.event_name == 'push' && github.ref == 'refs/heads/main'
+        uses: peaceiris/actions-gh-pages@v4
+        with:
+          github_token: ${{ secrets.GITHUB_TOKEN }}
+          publish_dir: ./build
+          publish_branch: asf-site
\ No newline at end of file

Reply via email to