Skip to content

Commit 57ae2da

Browse files
Jwaegebaertmilanholemans
authored andcommitted
Updates workflows to build & test Docusaurs. Closes pnp#4754
1 parent bc88a8f commit 57ae2da

File tree

3 files changed

+47
-23
lines changed

3 files changed

+47
-23
lines changed

.github/workflows/check_pr.yml

+10-5
Original file line numberDiff line numberDiff line change
@@ -112,14 +112,19 @@ jobs:
112112
name: coverage-${{ matrix.os }}-${{ matrix.nodeRun }}
113113
path: coverage.tar
114114
test_docs:
115-
if: github.repository_owner == 'pnp' && github.event.pull_request.base.ref != 'docs-migration'
115+
if: github.repository_owner == 'pnp'
116116
runs-on: ubuntu-latest
117117

118118
steps:
119119
- uses: actions/checkout@v3
120-
- uses: actions/setup-python@v4
120+
- uses: actions/setup-node@v3
121121
with:
122-
python-version: 3.x
123-
- run: pip install -r docs/pip_requirements.txt
124-
- run: mkdocs build --strict
122+
node-version: 18
123+
124+
- name: Install dependencies
125+
run: npm ci
126+
working-directory: docs
127+
128+
- name: Build docs
129+
run: npm run build
125130
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

+28-14
Original file line numberDiff line numberDiff line change
@@ -113,18 +113,28 @@ jobs:
113113
with:
114114
name: coverage-${{ matrix.os }}-${{ matrix.nodeRun }}
115115
path: coverage.tar
116-
test_docs:
116+
build_docs:
117117
if: github.repository_owner == 'pnp'
118118
runs-on: ubuntu-latest
119119

120120
steps:
121121
- uses: actions/checkout@v3
122-
- uses: actions/setup-python@v4
122+
- uses: actions/setup-node@v3
123123
with:
124-
python-version: 3.x
125-
- run: pip install -r docs/pip_requirements.txt
126-
- run: mkdocs build --strict
124+
node-version: 18
125+
126+
- name: Install dependencies
127+
run: npm ci
128+
working-directory: docs
129+
130+
- name: Build docs
131+
run: npm run build
127132
working-directory: docs
133+
134+
- name: Upload artifact
135+
uses: actions/upload-pages-artifact@v1
136+
with:
137+
path: docs/build
128138
publish_next:
129139
if: github.repository_owner == 'pnp'
130140
needs: [test, test_docs]
@@ -169,17 +179,21 @@ jobs:
169179
path: build.tar
170180
deploy_docs:
171181
if: github.repository_owner == 'pnp'
172-
needs: publish_next
173-
runs-on: ubuntu-latest
182+
needs: build_docs
174183

184+
permissions:
185+
pages: write
186+
id-token: write
187+
188+
environment:
189+
name: github-pages
190+
url: ${{ steps.deployment.outputs.page_url }}
191+
192+
runs-on: ubuntu-latest
175193
steps:
176-
- uses: actions/checkout@v3
177-
- uses: actions/setup-python@v4
178-
with:
179-
python-version: 3.x
180-
- run: pip install -r docs/pip_requirements.txt
181-
- run: mkdocs gh-deploy --force -m "[ci skip]"
182-
working-directory: docs
194+
- name: Deploy to GitHub Pages
195+
id: deployment
196+
uses: actions/deploy-pages@v2
183197
deploy_docker:
184198
if: github.repository_owner == 'pnp'
185199
needs: publish_next

0 commit comments

Comments
 (0)