Publish simple HTML examples

This commit is contained in:
Franck Royer 2022-05-13 16:06:16 +10:00
parent 82f1b5a135
commit 09986d4e2b
No known key found for this signature in database
GPG Key ID: A82ED75A8DFC50A4
3 changed files with 18 additions and 0 deletions

View File

@ -40,6 +40,13 @@ pipeline {
}
}
stage('HTML Examples') {
parallel {
stage('relay-js') { steps { script { copyExample() } } }
stage('store-js') { steps { script { copyExample() } } }
}
}
stage('Publish') {
when { expression { GIT_BRANCH.endsWith('master') } }
steps { script {
@ -63,3 +70,10 @@ def buildExample(example=STAGE_NAME) {
sh "cp -r build/. ${dest}"
}
}
def copyExample(example=STAGE_NAME) {
def dest = "${WORKSPACE}/build/docs/examples/${example}"
dir("examples/${example}") {
sh "cp index.html ${dest}"
}
}

View File

@ -9,3 +9,5 @@
This example uses Waku Relay to send and receive simple text messages.
To test the example, simply download the `index.html` file from this folder and open it in a browser.
The `master` branch's HEAD is deployed at https://js-waku.wakuconnect.dev/examples/relay-js/.

View File

@ -9,3 +9,5 @@
This example uses Waku Store to retrieve the latest ping relay message (used for keep alive purposes) and displays its timestamp.
To test the example, simply download the `index.html` file from this folder and open it in a browser.
The `master` branch's HEAD is deployed at https://js-waku.wakuconnect.dev/examples/store-js/.