diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000000..ca1acd193d --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,42 @@ +# 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 + with: + node-version: 12.x + - run: node --version + name: NPM install + - run: npm install + name: NPM install + - name: build doc + 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 _book oss://rokid-platform/docs/main-test/ + 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": {