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

juzhiyuan pushed a commit to branch feat-sync-docs
in repository https://gitbox.apache.org/repos/asf/apisix-website.git

commit ffd94c7fb95a99d4d8f3822890b953978056aef7
Author: juzhiyuan <juzhiy...@apache.org>
AuthorDate: Thu Feb 25 13:36:14 2021 +0800

    feat: sync docs & deploy
---
 .github/workflows/deploy.yml        |  4 ++++
 .github/workflows/updateDocs.yaml   | 30 ------------------------------
 pullDocs.js => scripts/sync-docs.js |  2 +-
 3 files changed, 5 insertions(+), 31 deletions(-)

diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml
index 7f3ec3f..b2b5131 100644
--- a/.github/workflows/deploy.yml
+++ b/.github/workflows/deploy.yml
@@ -23,6 +23,10 @@ jobs:
       # Checks-out your repository under $GITHUB_WORKSPACE, so your job can 
access it
       - uses: actions/checkout@v2
 
+      - name: Pull Docs
+        run: |
+          node scripts/sync-docs.js && git status
+
       - name: Build
         run: |
           cd website && yarn && yarn build
diff --git a/.github/workflows/updateDocs.yaml 
b/.github/workflows/updateDocs.yaml
deleted file mode 100644
index 924174a..0000000
--- a/.github/workflows/updateDocs.yaml
+++ /dev/null
@@ -1,30 +0,0 @@
-name: Sync Docs from projects
-
-on:
-  push:
-    branches: [master]
-  schedule:
-    # Run everyday at 6:00 AM (See 
https://pubs.opengroup.org/onlinepubs/9699919799/utilities/crontab.html#tag_20_25_07)
-    - cron: "0 6 * * *"
-
-jobs:
-  pull-docs:
-    runs-on: ubuntu-latest
-
-    steps:
-      - uses: actions/checkout@v2
-      - uses: actions/setup-node@v2
-        with:
-          node-version: "12"
-
-      - name: Pull Docs
-        run: |
-          node pullDocs.js && git status
-
-      - name: Add & Commit
-        run: |
-          git config user.name github-actions
-          git config user.email github-acti...@github.com
-          git add .
-          git commit -m "docs: update docs (by GitHub Action)"
-          git push
diff --git a/pullDocs.js b/scripts/sync-docs.js
similarity index 98%
rename from pullDocs.js
rename to scripts/sync-docs.js
index 8a055a7..4d4ace9 100644
--- a/pullDocs.js
+++ b/scripts/sync-docs.js
@@ -1,4 +1,4 @@
-console.log("Start pullDocs.js");
+console.log("Start sync-docs.js");
 
 const childProcess = require("child_process");
 const fs = require("fs");

Reply via email to