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

dinglei pushed a commit to branch new-official-website
in repository https://gitbox.apache.org/repos/asf/rocketmq-site.git


The following commit(s) were added to refs/heads/new-official-website by this 
push:
     new 168c6396 try to add pre-release action. (#189)
168c6396 is described below

commit 168c6396d6dedf608c6ba146be8357fb2d5e7364
Author: dinglei <[email protected]>
AuthorDate: Sun Aug 21 00:48:01 2022 +0800

    try to add pre-release action. (#189)
---
 .github/workflows/pre-release.yml | 39 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 39 insertions(+)

diff --git a/.github/workflows/pre-release.yml 
b/.github/workflows/pre-release.yml
new file mode 100644
index 00000000..391b3253
--- /dev/null
+++ b/.github/workflows/pre-release.yml
@@ -0,0 +1,39 @@
+name: publish-asf-site
+
+on:
+  push:
+    branches: [ new-official-website ]
+  workflow_dispatch:
+
+jobs:
+  build:
+    runs-on: ubuntu-latest
+
+    steps:
+      - uses: actions/checkout@v2
+        with:
+          path: rocketmq-site
+
+      - run: |
+          cd $GITHUB_WORKSPACE/rocketmq-site/
+          npm run build
+          mv build content
+          rm .git/ -rf
+
+      - uses: actions/checkout@v2
+        with:
+          ref: new-website-pre
+          path: new-website-pre
+
+      - run: |
+          cd $GITHUB_WORKSPACE/new-website-pre/
+          git rm -rf .
+          cp -Rf $GITHUB_WORKSPACE/rocketmq-site/. .
+          ls
+          git config --global user.email "[email protected]"
+          git config --global user.name "github-action"
+          sed -i "/content/d" .gitignore
+          git add .
+          git status
+          git commit -m "[Pre-Release]Latest site on successful build 
auto-pushed to new-website-pre"
+          git push

Reply via email to