From 82f1b5a135f1753e4c990730e1f4973417deeedf Mon Sep 17 00:00:00 2001 From: Franck Royer Date: Fri, 13 May 2022 16:05:58 +1000 Subject: [PATCH 1/3] Publish store and relay ReactJS examples --- examples/relay-reactjs-chat/README.md | 2 ++ examples/relay-reactjs-chat/package.json | 1 + examples/store-reactjs-chat/README.md | 2 ++ examples/store-reactjs-chat/package.json | 1 + 4 files changed, 6 insertions(+) diff --git a/examples/relay-reactjs-chat/README.md b/examples/relay-reactjs-chat/README.md index 345c2febdf..e5fc602b93 100644 --- a/examples/relay-reactjs-chat/README.md +++ b/examples/relay-reactjs-chat/README.md @@ -11,6 +11,8 @@ A barebone chat app to illustrate the [ReactJS Relay guide](https://docs.wakuconnect.dev/docs/guides/07_reactjs_relay/). +The `master` branch's HEAD is deployed at https://js-waku.wakuconnect.dev/examples/relay-reactjs-chat/. + To run a development version locally, do: ```shell diff --git a/examples/relay-reactjs-chat/package.json b/examples/relay-reactjs-chat/package.json index 75604ff0c4..dbf4da5df1 100644 --- a/examples/relay-reactjs-chat/package.json +++ b/examples/relay-reactjs-chat/package.json @@ -2,6 +2,7 @@ "name": "relay-reactjs-chat", "version": "0.1.0", "private": true, + "homepage": "/examples/relay-reactjs-chat", "dependencies": { "@testing-library/jest-dom": "^5.16.2", "@testing-library/react": "^13.2.0", diff --git a/examples/store-reactjs-chat/README.md b/examples/store-reactjs-chat/README.md index 194951948c..cd68618f1e 100644 --- a/examples/store-reactjs-chat/README.md +++ b/examples/store-reactjs-chat/README.md @@ -9,6 +9,8 @@ A simple app that retrieves chat messages using [Waku Store](https://rfc.vac.dev/spec/13/) to illustrate the [Retrieve Messages Using Waku Store With ReactJS guide](https://docs.wakuconnect.dev/docs/guides/08_reactjs_store/). +The `master` branch's HEAD is deployed at https://js-waku.wakuconnect.dev/examples/store-reactjs-chat/. + To run a development version locally, do: ```shell diff --git a/examples/store-reactjs-chat/package.json b/examples/store-reactjs-chat/package.json index 8d24111c1c..e9471428e7 100644 --- a/examples/store-reactjs-chat/package.json +++ b/examples/store-reactjs-chat/package.json @@ -2,6 +2,7 @@ "name": "store-reactjs-chat", "version": "0.1.0", "private": true, + "homepage": "/examples/store-reactjs-chat", "dependencies": { "@testing-library/jest-dom": "^5.16.4", "@testing-library/react": "^13.2.0", From 09986d4e2b454e763eaf99c6e248a78b6d6c2fcf Mon Sep 17 00:00:00 2001 From: Franck Royer Date: Fri, 13 May 2022 16:06:16 +1000 Subject: [PATCH 2/3] Publish simple HTML examples --- ci/Jenkinsfile.gh-pages | 14 ++++++++++++++ examples/relay-js/README.md | 2 ++ examples/store-js/README.md | 2 ++ 3 files changed, 18 insertions(+) diff --git a/ci/Jenkinsfile.gh-pages b/ci/Jenkinsfile.gh-pages index b408e75257..7a621ba5ef 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 c972622886..80f38e05bc 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 524c405bb8..27ab8d379b 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/. From 58a92dcef0215b395da5e8366f36ebeceab2aaab Mon Sep 17 00:00:00 2001 From: Franck Royer Date: Fri, 13 May 2022 16:06:24 +1000 Subject: [PATCH 3/3] Fix phrasing --- examples/eth-pm-wallet-encryption/README.md | 2 +- examples/eth-pm/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/eth-pm-wallet-encryption/README.md b/examples/eth-pm-wallet-encryption/README.md index 93fc0068f1..c703a0396f 100644 --- a/examples/eth-pm-wallet-encryption/README.md +++ b/examples/eth-pm-wallet-encryption/README.md @@ -15,7 +15,7 @@ using the encryption API provided by some Web3 Wallet provider such as [MetaMask The sender only needs to know the Ethereum address of the recipient. The recipient must broadcast his encryption public key as a first step. -The `master` branch's HEAD is deployed on GitHub Pages at https://js-waku.wakuconnect.dev/examples/eth-pm-wallet-encryption/. +The `master` branch's HEAD is deployed at https://js-waku.wakuconnect.dev/examples/eth-pm-wallet-encryption/. To run a development version locally, do: diff --git a/examples/eth-pm/README.md b/examples/eth-pm/README.md index 1af04d15bf..d9099e1760 100644 --- a/examples/eth-pm/README.md +++ b/examples/eth-pm/README.md @@ -17,7 +17,7 @@ only knowing their Ethereum Address. This protocol has been created to demonstrated how encryption and signature could be added to message sent over the Waku v2 network. -The `master` branch's HEAD is deployed on GitHub Pages at https://js-waku.wakuconnect.dev/examples/eth-pm/. +The `master` branch's HEAD is deployed at https://js-waku.wakuconnect.dev/examples/eth-pm/. To run a development version locally, do: