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

yuzhou pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/rocketmq-site.git

commit 28a74d2e9f476a532861a1e1d460ff8f76621e8c
Author: yuz10 <[email protected]>
AuthorDate: Wed Aug 18 01:26:27 2021 +0800

    use github action to publish site automatically
---
 .github/workflows/publish-asf-site.yml | 39 ++++++++++++++++++++++++++++++++++
 .travis.yml                            |  4 ++--
 2 files changed, 41 insertions(+), 2 deletions(-)

diff --git a/.github/workflows/publish-asf-site.yml 
b/.github/workflows/publish-asf-site.yml
new file mode 100644
index 0000000..47e0838
--- /dev/null
+++ b/.github/workflows/publish-asf-site.yml
@@ -0,0 +1,39 @@
+name: publish-asf-site
+
+on:
+  push:
+    branches: [ master ]
+  workflow_dispatch:
+
+jobs:
+  build:
+    runs-on: ubuntu-latest
+
+    steps:
+      - uses: actions/checkout@v2
+        with:
+          path: rocketmq-site
+
+      - run: |
+          cd $GITHUB_WORKSPACE/rocketmq-site/
+          sudo gem install jekyll bundler
+          bundle install
+          bundle exec jekyll build
+          rm .git/ -rf
+
+      - uses: actions/checkout@v2
+        with:
+          ref: asf-site
+          path: asf-site
+
+      - run: |
+          cd $GITHUB_WORKSPACE/asf-site/
+          git rm -rf .
+          cp -Rf $GITHUB_WORKSPACE/rocketmq-site/. .
+          ls
+          git config --global user.email "[email protected]"
+          git config --global user.name "github-action"
+          git add .
+          git status
+          git commit -m "Latest site on successful build auto-pushed to 
asf-site"
+          git push
diff --git a/.travis.yml b/.travis.yml
index f0c5da0..46e0659 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -8,5 +8,5 @@ env:
 script:
 - bundle install
 - bundle exec jekyll build
-after_success:
-- bash .utility/push-site-to-master.sh
+#after_success:
+#- bash .utility/push-site-to-master.sh

Reply via email to