6
6
pull_request :
7
7
branches : [ main ]
8
8
9
+ permissions :
10
+ contents : read
11
+ pages : write
12
+ id-token : write
13
+
9
14
jobs :
10
15
build :
11
16
runs-on : ubuntu-latest
@@ -146,14 +151,6 @@ jobs:
146
151
token : ${{ secrets.NPM_PUBLISH_AUTOMATION_TOKEN }}
147
152
tarball-name : " substrate-smoldot-discovery"
148
153
package-directory : ./packages/smoldot-discovery
149
- - name : Fetch gh-pages
150
- if : steps.publish_connect.outputs.type || steps.publish_connect_extension_protocol.outputs.type
151
- run : |
152
- git remote set-branches origin gh-pages
153
- git fetch --depth 1 origin gh-pages
154
- - name : Deploy Projects & Docs
155
- if : steps.publish_connect.outputs.type || steps.publish_connect_extension_protocol.outputs.type
156
- run : pnpm deploy-projects-and-docs
157
154
158
155
upload-extension-artifacts :
159
156
if : github.ref == 'refs/heads/main'
@@ -177,6 +174,29 @@ jobs:
177
174
name : substrate-connect-extension-mv3-chrome
178
175
path : ./projects/extension/dist
179
176
177
+ docs :
178
+ if : github.ref == 'refs/heads/main'
179
+ needs : [build]
180
+ runs-on : ubuntu-latest
181
+ steps :
182
+ - uses : actions/checkout@v4.1.7
183
+ - uses : ./.github/actions/turbo-build
184
+ - name : Generate API Docs
185
+ run : pnpm api-docs
186
+
187
+ - name : Setup Pages
188
+ uses : actions/configure-pages@v3
189
+
190
+ - name : Upload artifact
191
+ uses : actions/upload-pages-artifact@v2
192
+ with :
193
+ # Upload entire repository
194
+ path : ' ./docs'
195
+
196
+ - name : Deploy to GitHub Pages
197
+ id : deployment
198
+ uses : actions/deploy-pages@v2
199
+
180
200
all :
181
201
# This dummy job depends on all the mandatory checks. It succeeds if and only if all CI checks
182
202
# are successful.
0 commit comments