From fccd8ad5c0826bbd002b55116ebf2c1686af1e3d Mon Sep 17 00:00:00 2001 From: Matt Simerson Date: Thu, 17 Mar 2022 17:59:02 -0700 Subject: [PATCH] workflows: move docs to its own workflow --- .github/workflows/ci.yml | 13 +++--------- .github/workflows/docs.yml | 42 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+), 10 deletions(-) create mode 100644 .github/workflows/docs.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2e6d8920..f4041413 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,8 +14,8 @@ jobs: strategy: matrix: - os: [ ubuntu-latest, windows-latest ] - node-version: [ 14.x, 16.x ] + os: [ ubuntu-latest ] + node-version: [ 12.x, 14.x, 16.x ] fail-fast: false steps: @@ -35,11 +35,4 @@ jobs: cd docs; npm install; cd .. - name: Run tests - run: npm run test - - - name: Docs - run: | - cd docs; npm run make; cd .. - git status - git diff - git diff-index --quiet HEAD -- docs || (echo "$(tput bold)$(tput setaf 4)Did you forget to rebuild the docs? $ cd docs; npm run make$(tput sgr0)"; exit 1) + run: npm run test \ No newline at end of file diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 00000000..3a2ad8e0 --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,42 @@ + +name: Docs + +on: [ push ] + +env: + CI: true + +jobs: + + ci-test: + + runs-on: ${{ matrix.os }} + + strategy: + matrix: + os: [ ubuntu-latest ] + node-version: [ 16.x ] + fail-fast: false + + steps: + - uses: actions/checkout@v2 + name: Checkout Module + with: + fetch-depth: 1 + + - uses: actions/setup-node@v2 + name: Use Node.js ${{ matrix.node-version }} + with: + node-version: ${{ matrix.node-version }} + + - name: npm install + run: | + npm install + cd docs; npm install; cd .. + + - name: Docs + run: | + cd docs; npm run make; cd .. + git status + git diff + git diff-index --quiet HEAD -- docs || (echo "$(tput bold)$(tput setaf 4)Did you forget to rebuild the docs? $ cd docs; npm run make$(tput sgr0)"; exit 1)