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

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


The following commit(s) were added to refs/heads/main by this push:
     new 415adf7  AMBARI-26291:Set Write Permissions for GITHUB_TOKEN (#18)
415adf7 is described below

commit 415adf7e6f58001e8827af24e292ecfc568546a9
Author: tongxiaojun <[email protected]>
AuthorDate: Sat Jan 18 13:49:57 2025 +0800

    AMBARI-26291:Set Write Permissions for GITHUB_TOKEN (#18)
---
 .github/workflows/website.yml | 22 ++++++++++++++++++++--
 1 file changed, 20 insertions(+), 2 deletions(-)

diff --git a/.github/workflows/website.yml b/.github/workflows/website.yml
index 46c9bd7..73f082a 100644
--- a/.github/workflows/website.yml
+++ b/.github/workflows/website.yml
@@ -1,5 +1,8 @@
 name: Build and Deploy
 
+permissions:
+  contents: write
+  
 on:
   pull_request:
     branches:
@@ -12,7 +15,7 @@ jobs:
   build-website-deploy:
     runs-on: ubuntu-latest
     steps:
-      # Build main document: DolphinScheduler documentation
+      # Build main document: Apache Ambari documentation
       - name: Checkout
         uses: actions/checkout@master
 
@@ -33,4 +36,19 @@ jobs:
           publish_dir: ./build
           user_name: 'github-actions[bot]'
           user_email: 'github-actions[bot]@users.noreply.github.com'
-          commit_message: 'Automated deployment:'
\ No newline at end of file
+          commit_message: 'Automated deployment:'
+
+      - name: Update .asf.yaml
+        run: |
+          git config --global user.name "GitHub Actions"
+          git config --global user.email "[email protected]"
+          git fetch --all
+          git checkout asf-site
+          echo 'staging:'           > .asf.yaml
+          echo '  profile: ~'       >> .asf.yaml
+          echo '  whoami: asf-site' >> .asf.yaml
+          git add .asf.yaml
+          git commit -m '.asf.yaml'
+          git push origin asf-site
+        env:
+          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
\ No newline at end of file


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to