Skip to content

Commit

Permalink
Updates workflows to build & test Docusaurs. Closes pnp#4754
Browse files Browse the repository at this point in the history
  • Loading branch information
Jwaegebaert committed Apr 22, 2023
1 parent 054fe2e commit d301d41
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 17 deletions.
16 changes: 11 additions & 5 deletions .github/workflows/check_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,14 +109,20 @@ 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
cache: yarn

- name: Install dependencies
run: yarn install --frozen-lockfile
working-directory: docs

- name: Test build docs
run: yarn build
working-directory: docs
14 changes: 10 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,17 @@ 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
cache: yarn

- name: Install dependencies
run: yarn install --frozen-lockfile
working-directory: docs

- name: Test build docs
run: yarn build
working-directory: docs
publish:
if: github.repository_owner == 'pnp'
Expand Down
38 changes: 30 additions & 8 deletions .github/workflows/release_next.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,17 @@ 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
cache: yarn

- name: Install dependencies
run: yarn install --frozen-lockfile
working-directory: docs

- name: Test build docs
run: yarn build
working-directory: docs
publish_next:
if: github.repository_owner == 'pnp'
Expand Down Expand Up @@ -171,12 +177,28 @@ 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
cache: yarn

- name: Install dependencies
run: yarn install --frozen-lockfile
working-directory: docs

- name: Test build docs
run: yarn 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
Expand Down

0 comments on commit d301d41

Please sign in to comment.