Skip to content

Commit 4a06416

Browse files
committed
Updates workflows to build & test Docusaurs. Closes pnp#4754
1 parent 686e8b9 commit 4a06416

File tree

3 files changed

+51
-27
lines changed

3 files changed

+51
-27
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 ci
123+
working-directory: docs
124+
125+
- name: 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 ci
91+
working-directory: docs
92+
93+
- name: Build docs
94+
run: npm run build
9095
working-directory: docs
9196
publish:
9297
if: github.repository_owner == 'pnp'

.github/workflows/release_next.yml

+32-18
Original file line numberDiff line numberDiff line change
@@ -110,18 +110,45 @@ jobs:
110110
with:
111111
name: coverage-${{ matrix.os }}-${{ matrix.nodeRun }}
112112
path: coverage.tar
113-
test_docs:
113+
build_docs:
114114
if: github.repository_owner == 'pnp'
115115
runs-on: ubuntu-latest
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 ci
124125
working-directory: docs
126+
127+
- name: Build docs
128+
run: npm run build
129+
working-directory: docs
130+
131+
- name: Upload artifact
132+
uses: actions/upload-pages-artifact@v1
133+
with:
134+
path: docs/build
135+
deploy_docs:
136+
if: github.repository_owner == 'pnp'
137+
needs: build_docs
138+
139+
permissions:
140+
pages: write
141+
id-token: write
142+
143+
environment:
144+
name: github-pages
145+
url: ${{ steps.deployment.outputs.page_url }}
146+
147+
runs-on: ubuntu-latest
148+
steps:
149+
- name: Deploy to GitHub Pages
150+
id: deployment
151+
uses: actions/deploy-pages@v2
125152
publish_next:
126153
if: github.repository_owner == 'pnp'
127154
needs: [test, test_docs]
@@ -164,19 +191,6 @@ jobs:
164191
with:
165192
name: build-ubuntu-latest-18
166193
path: build.tar
167-
deploy_docs:
168-
if: github.repository_owner == 'pnp'
169-
needs: publish_next
170-
runs-on: ubuntu-latest
171-
172-
steps:
173-
- uses: actions/checkout@v3
174-
- uses: actions/setup-python@v4
175-
with:
176-
python-version: 3.x
177-
- run: pip install -r docs/pip_requirements.txt
178-
- run: mkdocs gh-deploy --force -m "[ci skip]"
179-
working-directory: docs
180194
deploy_docker:
181195
if: github.repository_owner == 'pnp'
182196
needs: publish_next

0 commit comments

Comments
 (0)