diff --git a/.github/workflows/b3pay-site.yml b/.github/workflows/b3pay-site.yml new file mode 100644 index 0000000..b28a90c --- /dev/null +++ b/.github/workflows/b3pay-site.yml @@ -0,0 +1,36 @@ +# Publishes docs/ to b3pay.net, where it is served at +# https://b3pay.net/docs/b3note/, as b3pay-module.json describes. +# b3pay.net's reusable workflow builds and checks the module, then builds the +# whole site with it, so a page that would break the site fails here. On main +# it also commits the built module to this repository's b3pay-site branch, +# which b3pay.net serves, and asks b3pay.net to rebuild. It never writes to +# b3pay.net. +name: Docs on b3pay.net + +on: + push: + branches: [main] + paths: + - "docs/**" + - "b3pay-module.json" + - ".github/workflows/b3pay-site.yml" + pull_request: + paths: + - "docs/**" + - "b3pay-module.json" + - ".github/workflows/b3pay-site.yml" + +permissions: {} + +jobs: + module: + name: Docs module + # A commit of B3Pay/b3pay.net, not a branch: the publish job holds a token + # that can push to this repository. + uses: B3Pay/b3pay.net/.github/workflows/publish-module.yml@07de4cdc9dc27c1dcc56d7db44b08d4c9d617c3c + with: + publish: ${{ github.event_name == 'push' }} + permissions: + contents: write + secrets: + deploy-hook: ${{ secrets.B3PAY_SITE_DEPLOY_HOOK }} diff --git a/README.md b/README.md index 5fff290..72a87fa 100644 --- a/README.md +++ b/README.md @@ -70,6 +70,10 @@ Then open the `frontend` URL that `icp deploy` prints. - **[Operations](docs/operations.md):** deploying to mainnet, limits and costs, and the custom domain - **[B3Note v2](docs/v2.md):** what v2 fixed in v1, and how mainnet moved to v2 +The same pages are at [b3pay.net/docs/b3note](https://b3pay.net/docs/b3note/). The +[Docs on b3pay.net](.github/workflows/b3pay-site.yml) workflow checks them on every pull request +that changes `docs/`, and publishes them when they change on `main`. + ## Built with [Internet Computer](https://internetcomputer.org) ยท diff --git a/b3pay-module.json b/b3pay-module.json new file mode 100644 index 0000000..5368cbe --- /dev/null +++ b/b3pay-module.json @@ -0,0 +1,25 @@ +{ + "$schema": "https://b3pay.net/schemas/b3pay-module.schema.json", + "schema": 1, + "id": "b3note", + "title": "B3Note", + "description": "Private notes on the Internet Computer, encrypted in the browser with vetKeys before they reach the canister.", + "group": "internet-computer", + "status": "maintained", + "links": { + "repository": "https://github.com/B3Pay/B3Note", + "app": "https://note.b3pay.net" + }, + "editUrl": "https://github.com/B3Pay/B3Note/edit/main/docs/{path}", + "source": { + "docs": "docs", + "include": ["*.md"], + "rename": { "how-it-works.md": "index.md" } + }, + "sidebar": [ + { "label": "How it works", "page": "index" }, + { "label": "Development", "page": "development" }, + { "label": "Operations", "page": "operations" }, + { "label": "What changed in v2", "page": "v2" } + ] +}