Skip to content

Commit

Permalink
make update docs part of build process
Browse files Browse the repository at this point in the history
  • Loading branch information
LukasJenicek committed Oct 16, 2024
1 parent 280d9b3 commit 0fa98f3
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 1 deletion.
32 changes: 32 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -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 [email protected]
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
2 changes: 1 addition & 1 deletion docs/pages/api/marketplace/examples.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
],
"/rpc/Marketplace/GenerateBuyTransaction": [
{
"summary": "Fulfill listing on reservoir",
"summary": "Fulfill listing on reservoi",
"request": {
"collectionAddress": "0x44b3f42e2bf34f62868ff9e9dab7c2f807ba97cb",
"buyer": "0xD2eFbb2f18bfE3D265b26D2ACe83400A65335a07",
Expand Down

0 comments on commit 0fa98f3

Please sign in to comment.