From cf6f7cbc32b6031bcbf4c878bb4d2d205d811cb6 Mon Sep 17 00:00:00 2001 From: maxbbn Date: Wed, 10 Mar 2021 17:18:34 +0800 Subject: [PATCH 1/4] Create main.yml --- .github/workflows/main.yml | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000000..521c78870b --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,38 @@ +# This is a basic workflow to help you get started with Actions + +name: CI + +# Controls when the action will run. +on: + # Triggers the workflow on push or pull request events but only for the master branch + push: + branches: [ master, action ] + pull_request: + branches: [ master ] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "build" + build: + runs-on: ubuntu-latest + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - uses: actions/checkout@v2 + - name: Setup Node.js environment + uses: actions/setup-node@v2.1.5 + - run: yarn + name: NPM install + - name: build doc + run: yarn build + - uses: manyuanrong/setup-ossutil@v2.0 + with: + # the bucket data region location + endpoint: oss-cn-hangzhou.aliyuncs.com + access-key-id: ${{ secrets.OSS_KEY }} + access-key-secret: ${{ secrets.OSS_SECRET }} + - run: ossutil cp -rf docs oss://rokid-platform/docs/main/ + From b4f531f4c73c24d74d8aefe8ccd1d343f2942c77 Mon Sep 17 00:00:00 2001 From: maxbbn Date: Wed, 10 Mar 2021 17:32:18 +0800 Subject: [PATCH 2/4] Update main.yml --- .github/workflows/main.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 521c78870b..4950da68c6 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -24,15 +24,15 @@ jobs: - uses: actions/checkout@v2 - name: Setup Node.js environment uses: actions/setup-node@v2.1.5 - - run: yarn + - run: npm install name: NPM install - name: build doc - run: yarn build + run: npm run build - uses: manyuanrong/setup-ossutil@v2.0 with: # the bucket data region location endpoint: oss-cn-hangzhou.aliyuncs.com access-key-id: ${{ secrets.OSS_KEY }} access-key-secret: ${{ secrets.OSS_SECRET }} - - run: ossutil cp -rf docs oss://rokid-platform/docs/main/ + - run: ossutil cp -rf _book oss://rokid-platform/docs/main-test/ From 9145f7cabc883831dc74363474c2b275d1a75d8d Mon Sep 17 00:00:00 2001 From: maxbbn Date: Wed, 10 Mar 2021 17:39:57 +0800 Subject: [PATCH 3/4] Update main.yml --- .github/workflows/main.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4950da68c6..ca1acd193d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -24,6 +24,10 @@ jobs: - uses: actions/checkout@v2 - name: Setup Node.js environment uses: actions/setup-node@v2.1.5 + with: + node-version: 12.x + - run: node --version + name: NPM install - run: npm install name: NPM install - name: build doc From bd130682b8ba89f8bb08489dc4f55bae05014812 Mon Sep 17 00:00:00 2001 From: maxbbn Date: Wed, 10 Mar 2021 17:48:31 +0800 Subject: [PATCH 4/4] Update package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 6cb2648278..2150fdda01 100755 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "version": "1.0.0", "license": "UNLICENSED", "scripts": { - "postinstall": "gitbook install", + "postinstall": "cd ./node_modules/npm && npm install graceful-fs@latest && cd ../../ && gitbook install", "build": "gitbook build" }, "dependencies": {