diff --git a/ci/Jenkinsfile.gh-pages b/ci/Jenkinsfile.gh-pages index b408e7525..7a621ba5e 100644 --- a/ci/Jenkinsfile.gh-pages +++ b/ci/Jenkinsfile.gh-pages @@ -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}" + } +} diff --git a/examples/relay-js/README.md b/examples/relay-js/README.md index c97262288..80f38e05b 100644 --- a/examples/relay-js/README.md +++ b/examples/relay-js/README.md @@ -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/. diff --git a/examples/store-js/README.md b/examples/store-js/README.md index 524c405bb..27ab8d379 100644 --- a/examples/store-js/README.md +++ b/examples/store-js/README.md @@ -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/.