Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates workflows to build & test Docusaurs. Closes #4754 #4789

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions .github/workflows/check_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,14 +112,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 ci
working-directory: docs

- name: Build docs
run: npm run build
working-directory: docs
13 changes: 9 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 ci
working-directory: docs

- name: Build docs
run: npm run build
working-directory: docs
publish:
if: github.repository_owner == 'pnp'
Expand Down
42 changes: 28 additions & 14 deletions .github/workflows/release_next.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,18 +113,28 @@ jobs:
with:
name: coverage-${{ matrix.os }}-${{ matrix.nodeRun }}
path: coverage.tar
test_docs:
build_docs:
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 ci
working-directory: docs

- name: Build docs
run: npm run build
working-directory: docs

- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: docs/build
publish_next:
if: github.repository_owner == 'pnp'
needs: [test, test_docs]
Expand Down Expand Up @@ -169,17 +179,21 @@ jobs:
path: build.tar
deploy_docs:
if: github.repository_owner == 'pnp'
needs: publish_next
runs-on: ubuntu-latest
needs: build_docs

permissions:
pages: write
id-token: write

environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: 3.x
- run: pip install -r docs/pip_requirements.txt
- run: mkdocs gh-deploy --force -m "[ci skip]"
working-directory: docs
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
deploy_docker:
if: github.repository_owner == 'pnp'
needs: publish_next
Expand Down