Skip to content

Commit d301d41

Browse files
committed
Updates workflows to build & test Docusaurs. Closes pnp#4754
1 parent 054fe2e commit d301d41

File tree

3 files changed

+51
-17
lines changed

3 files changed

+51
-17
lines changed

.github/workflows/check_pr.yml

+11-5
Original file line numberDiff line numberDiff line change
@@ -109,14 +109,20 @@ jobs:
109109
name: coverage-${{ matrix.os }}-${{ matrix.nodeRun }}
110110
path: coverage.tar
111111
test_docs:
112-
if: github.repository_owner == 'pnp' && github.event.pull_request.base.ref != 'docs-migration'
112+
if: github.repository_owner == 'pnp'
113113
runs-on: ubuntu-latest
114114

115115
steps:
116116
- uses: actions/checkout@v3
117-
- uses: actions/setup-python@v4
117+
- uses: actions/setup-node@v3
118118
with:
119-
python-version: 3.x
120-
- run: pip install -r docs/pip_requirements.txt
121-
- run: mkdocs build --strict
119+
node-version: 18
120+
cache: yarn
121+
122+
- name: Install dependencies
123+
run: yarn install --frozen-lockfile
124+
working-directory: docs
125+
126+
- name: Test build docs
127+
run: yarn build
122128
working-directory: docs

.github/workflows/release.yml

+10-4
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,17 @@ jobs:
8282

8383
steps:
8484
- uses: actions/checkout@v3
85-
- uses: actions/setup-python@v4
85+
- uses: actions/setup-node@v3
8686
with:
87-
python-version: 3.x
88-
- run: pip install -r docs/pip_requirements.txt
89-
- run: mkdocs build --strict
87+
node-version: 18
88+
cache: yarn
89+
90+
- name: Install dependencies
91+
run: yarn install --frozen-lockfile
92+
working-directory: docs
93+
94+
- name: Test build docs
95+
run: yarn build
9096
working-directory: docs
9197
publish:
9298
if: github.repository_owner == 'pnp'

.github/workflows/release_next.yml

+30-8
Original file line numberDiff line numberDiff line change
@@ -116,11 +116,17 @@ jobs:
116116

117117
steps:
118118
- uses: actions/checkout@v3
119-
- uses: actions/setup-python@v4
119+
- uses: actions/setup-node@v3
120120
with:
121-
python-version: 3.x
122-
- run: pip install -r docs/pip_requirements.txt
123-
- run: mkdocs build --strict
121+
node-version: 18
122+
cache: yarn
123+
124+
- name: Install dependencies
125+
run: yarn install --frozen-lockfile
126+
working-directory: docs
127+
128+
- name: Test build docs
129+
run: yarn build
124130
working-directory: docs
125131
publish_next:
126132
if: github.repository_owner == 'pnp'
@@ -171,12 +177,28 @@ jobs:
171177

172178
steps:
173179
- uses: actions/checkout@v3
174-
- uses: actions/setup-python@v4
180+
- uses: actions/setup-node@v3
175181
with:
176-
python-version: 3.x
177-
- run: pip install -r docs/pip_requirements.txt
178-
- run: mkdocs gh-deploy --force -m "[ci skip]"
182+
node-version: 18
183+
cache: yarn
184+
185+
- name: Install dependencies
186+
run: yarn install --frozen-lockfile
179187
working-directory: docs
188+
189+
- name: Test build docs
190+
run: yarn build
191+
working-directory: docs
192+
193+
- name: Deploy to GitHub Pages
194+
uses: peaceiris/actions-gh-pages@v3
195+
working-directory: docs
196+
with:
197+
github_token: ${{ secrets.GITHUB_TOKEN }}
198+
publish_dir: ./build
199+
user_name: github-actions[bot]
200+
user_email: 41898282+github-actions[bot]@users.noreply.github.com
201+
180202
deploy_docker:
181203
if: github.repository_owner == 'pnp'
182204
needs: publish_next

0 commit comments

Comments
 (0)