From 770b64d8bba3ec7a82f22e32a6b3c3fbba3c8f77 Mon Sep 17 00:00:00 2001 From: Jwaegebaert <38426621+Jwaegebaert@users.noreply.github.com> Date: Sat, 22 Apr 2023 18:06:21 +0200 Subject: [PATCH] Updates workflows to build & test Docusaurs. Closes #4754 --- .github/workflows/check_pr.yml | 15 ++++++++----- .github/workflows/release.yml | 13 +++++++---- .github/workflows/release_next.yml | 36 +++++++++++++++++++++++------- 3 files changed, 47 insertions(+), 17 deletions(-) diff --git a/.github/workflows/check_pr.yml b/.github/workflows/check_pr.yml index 30ef86f7d21..ec889d24d60 100644 --- a/.github/workflows/check_pr.yml +++ b/.github/workflows/check_pr.yml @@ -109,14 +109,19 @@ jobs: name: coverage-${{ matrix.os }}-${{ matrix.nodeRun }} path: coverage.tar test_docs: - if: github.repository_owner == 'pnp' && github.event.pull_request.base.ref != 'docs-migration' + if: github.repository_owner == 'pnp' runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 + - uses: actions/setup-node@v3 with: - python-version: 3.x - - run: pip install -r docs/pip_requirements.txt - - run: mkdocs build --strict + node-version: 18 + + - name: Install dependencies + run: npm install --frozen-lockfile + working-directory: docs + + - name: Test build docs + run: npm run build working-directory: docs diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ea7142e0476..d15c4c94b43 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -82,11 +82,16 @@ jobs: steps: - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 + - uses: actions/setup-node@v3 with: - python-version: 3.x - - run: pip install -r docs/pip_requirements.txt - - run: mkdocs build --strict + node-version: 18 + + - name: Install dependencies + run: npm install --frozen-lockfile + working-directory: docs + + - name: Test build docs + run: npm run build working-directory: docs publish: if: github.repository_owner == 'pnp' diff --git a/.github/workflows/release_next.yml b/.github/workflows/release_next.yml index e38f4b61385..6acd1f35181 100644 --- a/.github/workflows/release_next.yml +++ b/.github/workflows/release_next.yml @@ -116,11 +116,16 @@ jobs: steps: - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 + - uses: actions/setup-node@v3 with: - python-version: 3.x - - run: pip install -r docs/pip_requirements.txt - - run: mkdocs build --strict + node-version: 18 + + - name: Install dependencies + run: npm install --frozen-lockfile + working-directory: docs + + - name: Test build docs + run: npm run build working-directory: docs publish_next: if: github.repository_owner == 'pnp' @@ -171,12 +176,27 @@ jobs: steps: - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 + - uses: actions/setup-node@v3 with: - python-version: 3.x - - run: pip install -r docs/pip_requirements.txt - - run: mkdocs gh-deploy --force -m "[ci skip]" + node-version: 18 + + - name: Install dependencies + run: npm install --frozen-lockfile working-directory: docs + + - name: Test build docs + run: npm run build + working-directory: docs + + - name: Deploy to GitHub Pages + uses: peaceiris/actions-gh-pages@v3 + working-directory: docs + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./build + user_name: github-actions[bot] + user_email: 41898282+github-actions[bot]@users.noreply.github.com + deploy_docker: if: github.repository_owner == 'pnp' needs: publish_next