Skip to content

Commit 770b64d

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

File tree

3 files changed

+47
-17
lines changed

3 files changed

+47
-17
lines changed

.github/workflows/check_pr.yml

+10-5
Original file line numberDiff line numberDiff line change
@@ -109,14 +109,19 @@ 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+
121+
- name: Install dependencies
122+
run: npm install --frozen-lockfile
123+
working-directory: docs
124+
125+
- name: Test build docs
126+
run: npm run build
122127
working-directory: docs

.github/workflows/release.yml

+9-4
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,16 @@ 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+
89+
- name: Install dependencies
90+
run: npm install --frozen-lockfile
91+
working-directory: docs
92+
93+
- name: Test build docs
94+
run: npm run build
9095
working-directory: docs
9196
publish:
9297
if: github.repository_owner == 'pnp'

.github/workflows/release_next.yml

+28-8
Original file line numberDiff line numberDiff line change
@@ -116,11 +116,16 @@ 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+
123+
- name: Install dependencies
124+
run: npm install --frozen-lockfile
125+
working-directory: docs
126+
127+
- name: Test build docs
128+
run: npm run build
124129
working-directory: docs
125130
publish_next:
126131
if: github.repository_owner == 'pnp'
@@ -171,12 +176,27 @@ jobs:
171176

172177
steps:
173178
- uses: actions/checkout@v3
174-
- uses: actions/setup-python@v4
179+
- uses: actions/setup-node@v3
175180
with:
176-
python-version: 3.x
177-
- run: pip install -r docs/pip_requirements.txt
178-
- run: mkdocs gh-deploy --force -m "[ci skip]"
181+
node-version: 18
182+
183+
- name: Install dependencies
184+
run: npm install --frozen-lockfile
179185
working-directory: docs
186+
187+
- name: Test build docs
188+
run: npm run build
189+
working-directory: docs
190+
191+
- name: Deploy to GitHub Pages
192+
uses: peaceiris/actions-gh-pages@v3
193+
working-directory: docs
194+
with:
195+
github_token: ${{ secrets.GITHUB_TOKEN }}
196+
publish_dir: ./build
197+
user_name: github-actions[bot]
198+
user_email: 41898282+github-actions[bot]@users.noreply.github.com
199+
180200
deploy_docker:
181201
if: github.repository_owner == 'pnp'
182202
needs: publish_next

0 commit comments

Comments
 (0)