From ddfa3fee518d0f9c051a4181b68ee9f25221c4df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bahad=C4=B1r=20Sofuo=C4=9Flu?= Date: Wed, 8 Mar 2023 11:23:47 +0300 Subject: [PATCH] Apidoc workflow added --- .github/workflows/generate_api_doc.yml | 40 ++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/generate_api_doc.yml diff --git a/.github/workflows/generate_api_doc.yml b/.github/workflows/generate_api_doc.yml new file mode 100644 index 000000000..10053fdd5 --- /dev/null +++ b/.github/workflows/generate_api_doc.yml @@ -0,0 +1,40 @@ +name: Generate API DOC + +on: + push: + branches: [ master ] + paths: + - '**/**/*.d.ts' + +permissions: + contents: write + +jobs: + build: + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [16.x] + + steps: + - uses: actions/checkout@v3 + + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + + - name: Install node packages + run: npm install + + - name: Generate api doc + run: npm run apidoc + + - name: Commit doc + run: | + git config user.name "GitHub Actions Bot" + git config user.email "<>" + git commit -a -m "Update API doc" + git push