Skip to content

Update module and OpenAPI specs from zeta-chain/node #529

Update module and OpenAPI specs from zeta-chain/node

Update module and OpenAPI specs from zeta-chain/node #529

name: Update module and OpenAPI specs from zeta-chain/node
on:
schedule:
- cron: "0 0 * * *" # scheduled to run every day at midnight
workflow_dispatch:
jobs:
update-docs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Checkout zeta-chain/node repository
uses: actions/checkout@v2
with:
repository: zeta-chain/node
path: node
- name: Update module docs
run: |
mkdir -p src/pages/architecture/modules
rm -rf src/pages/architecture/modules/*
cp -r node/docs/spec/* src/pages/architecture/modules/
- name: Update zetacored CLI docs
run: |
mkdir -p src/pages/architecture/zetacored
rm -rf src/pages/architecture/zetacored/*
cp -r node/docs/cli/zetacored/* src/pages/architecture/zetacored/
- name: Update OpenAPI specs
run: |
mkdir -p public/data
rm -rf public/data/openapi.swagger.yaml
cp -r node/docs/openapi/openapi.swagger.yaml public/data/
echo -e "\nhost: zetachain-athens.blockpi.network/lcd/v1/public" >> public/data/openapi.swagger.yaml
rm -rf node
- name: Check for changes
id: check-changes
run: |
git add src/pages/architecture/modules
git add public/data/openapi.swagger.yaml
git diff --cached --exit-code || echo "::set-output name=changed::true"
- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
with:
title: "docs: update module and OpenAPI specs from the node repo"
body: |
This PR contains updates to the Cosmos SDK module and OpenAPI
specifications from the `zeta-chain/node` repository.
commit-message: |
"docs: update module and OpenAPI specs from zeta-chain/node"
base: main
branch: docs/updates-from-zeta-chain-node
if: steps.check-changes.outputs.changed == 'true'