Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make update docs part of build process #362

Merged
merged 3 commits into from
Oct 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading