From 0fa98f34ba0c6946c15a3ccf330d2d7219eb1581 Mon Sep 17 00:00:00 2001 From: Lukas Jenicek Date: Wed, 16 Oct 2024 13:51:13 +0200 Subject: [PATCH] make update docs part of build process --- .github/workflows/docs.yml | 32 ++++++++++++++++++++++++ docs/pages/api/marketplace/examples.json | 2 +- 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/docs.yml diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 0000000000..22a8b4fb2b --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,32 @@ +name: Docs +on: + pull_request: + paths: + - "**/examples.json" +jobs: + build: + runs-on: ubuntu-latest + name: Merge request && response examples + steps: + - name: git-checkout + uses: actions/checkout@v4 + with: + lfs: true + - name: Install dependencies + run: | + npm install -g pnpm@8.15.4 + pnpm install + - name: Merge request and responses + run: | + # Read the changed files from the previous step + node libs/example_merger.js merge docs/pages/api/indexer/indexer.gen.yaml docs/pages/api/metadata/metadata.gen.yaml docs/pages/api/marketplace/marketplace.gen.yaml + - name: Push changes + uses: 0xsequence/actions/git-commit@master + env: + API_TOKEN_GITHUB: ${{ secrets.GH_TOKEN_GIT_COMMIT }} + with: + src: "docs/pages/api/**/*.gen.yaml" + branch: ${{ github.head_ref }} + ## since openapi docs are generated and PR is automatically created there is no need to try create new one + pr_create: false + overwrite: true \ No newline at end of file diff --git a/docs/pages/api/marketplace/examples.json b/docs/pages/api/marketplace/examples.json index fe970ed46e..cf9167eccb 100644 --- a/docs/pages/api/marketplace/examples.json +++ b/docs/pages/api/marketplace/examples.json @@ -86,7 +86,7 @@ ], "/rpc/Marketplace/GenerateBuyTransaction": [ { - "summary": "Fulfill listing on reservoir", + "summary": "Fulfill listing on reservoi", "request": { "collectionAddress": "0x44b3f42e2bf34f62868ff9e9dab7c2f807ba97cb", "buyer": "0xD2eFbb2f18bfE3D265b26D2ACe83400A65335a07",