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

haonan pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/iotdb-docs.git

commit b6e39b415a6e9aac3e969661fc19862bfb2fdf9d
Author: HTHou <[email protected]>
AuthorDate: Tue Jul 11 18:55:38 2023 +0800

    update workflow
---
 .github/workflows/site-build.yaml | 24 +++++++++++++++++++++++-
 1 file changed, 23 insertions(+), 1 deletion(-)

diff --git a/.github/workflows/site-build.yaml 
b/.github/workflows/site-build.yaml
index 5f65cec..bf2249c 100644
--- a/.github/workflows/site-build.yaml
+++ b/.github/workflows/site-build.yaml
@@ -4,7 +4,6 @@ on:
   push:
     branches:
       - main
-    paths:
   pull_request:
     branches:
       - main
@@ -32,3 +31,26 @@ jobs:
         run: npm run build
       - name: Deploy staging
         run: npm run deploy:staging
+
+  deploy:
+    runs-on: ubuntu-latest
+    if: github.event_name == 'workflow_dispatch' && github.ref_name == 'main' 
|| github.event_name == 'push'
+
+    steps:
+      - uses: actions/checkout@v3
+      - name: Use Node.js 18.x
+        uses: actions/setup-node@v3
+        with:
+          node-version: 18.x
+      - name: Install dependencies
+        run: npm ci
+      - name: Test compile website
+        run: npm run build
+      - name: Deploy staging
+        env:
+          IOTDB_WEBSITE_BUILD: ${{ secrets.IOTDB_WEBSITE_BUILD }}
+        run: |
+          git config --global 
url."https://asf-ci-deploy:[email protected]/apache/".insteadOf 
"https://github.com/apache/";
+          git config --global user.name github-actions
+          git config --global user.email 
41898282+github-actions[bot]@users.noreply.github.com
+          npm run deploy:staging

Reply via email to