@@ -110,18 +110,45 @@ jobs:
110
110
with :
111
111
name : coverage-${{ matrix.os }}-${{ matrix.nodeRun }}
112
112
path : coverage.tar
113
- test_docs :
113
+ build_docs :
114
114
if : github.repository_owner == 'pnp'
115
115
runs-on : ubuntu-latest
116
116
117
117
steps :
118
118
- uses : actions/checkout@v3
119
- - uses : actions/setup-python@v4
119
+ - uses : actions/setup-node@v3
120
120
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
124
125
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
125
152
publish_next :
126
153
if : github.repository_owner == 'pnp'
127
154
needs : [test, test_docs]
@@ -164,19 +191,6 @@ jobs:
164
191
with :
165
192
name : build-ubuntu-latest-18
166
193
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
180
194
deploy_docker :
181
195
if : github.repository_owner == 'pnp'
182
196
needs : publish_next
0 commit comments