From e2fdc1c10f41b0b7ef2ccb5f568c2721c2568d05 Mon Sep 17 00:00:00 2001 From: Kevin Griffin Date: Wed, 23 Aug 2023 09:48:25 -0400 Subject: [PATCH 1/2] adds workflow to generate docs on push to main --- .github/workflows/main.yml | 17 ++++++++-- .github/workflows/update-documentation.yml | 39 ++++++++++++++++++++++ 2 files changed, 53 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/update-documentation.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f2a18f0c..3c97b338 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -11,12 +11,12 @@ on: workflow_dispatch: jobs: build: - name: Build, lint, and test on Node ${{ matrix.node }} and ${{ matrix.os }} + name: Build, lint, and test on Node 18.12.1 and ${{ matrix.os }} runs-on: ${{ matrix.os }} strategy: matrix: - os: [ macOS-latest] + os: [ macOS-latest, ubuntu-latest] steps: - name: Checkout repo @@ -38,4 +38,15 @@ jobs: - name: Upload coverage reports to Codecov uses: codecov/codecov-action@v3 env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} \ No newline at end of file + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + + - name: Commit files + run: | + git config --local user.email "github-actions[bot]@users.noreply.github.com" + git config --local user.name "github-actions[bot]" + git commit -a -m "Update documentation" + - name: Push changes + uses: ad-m/github-push-action@master + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + branch: ${{ github.ref }} \ No newline at end of file diff --git a/.github/workflows/update-documentation.yml b/.github/workflows/update-documentation.yml new file mode 100644 index 00000000..2edf1941 --- /dev/null +++ b/.github/workflows/update-documentation.yml @@ -0,0 +1,39 @@ +name: CI +on: + push: + branches: + - 'main' + workflow_dispatch: +jobs: + update: + name: Updater documentation + + runs-on: ubuntu-latest + + steps: + - name: Checkout repo + uses: actions/checkout@v2 + + - uses: actions/setup-node@v2 + with: + node-version: '18.12.1' + cache: 'npm' + + - name: build + run: | + npm cache clean --force + npm set registry https://registry.npmjs.org/ + npm i + npx typedoc src/index.ts + + - name: Commit files + run: | + git config --local user.email "github-actions[bot]@users.noreply.github.com" + git config --local user.name "github-actions[bot]" + git add . + git commit -a -m "Update documentation" + - name: Push changes + uses: ad-m/github-push-action@master + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + branch: ${{ github.ref }} \ No newline at end of file From 86245716cc3054c208ab726acb7f017b9f0f8b71 Mon Sep 17 00:00:00 2001 From: Kevin Griffin Date: Wed, 23 Aug 2023 09:49:32 -0400 Subject: [PATCH 2/2] adds workflow to generate docs on push to main --- .github/workflows/main.yml | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 3c97b338..e62de9b4 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -39,14 +39,3 @@ jobs: uses: codecov/codecov-action@v3 env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} - - - name: Commit files - run: | - git config --local user.email "github-actions[bot]@users.noreply.github.com" - git config --local user.name "github-actions[bot]" - git commit -a -m "Update documentation" - - name: Push changes - uses: ad-m/github-push-action@master - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - branch: ${{ github.ref }} \ No newline at end of file