Skip to content

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

Update module and OpenAPI specs from zeta-chain/node

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

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 protocol-contracts repository
uses: actions/checkout@v2
with:
repository: zeta-chain/node
path: node
- name: Update module docs
run: |
mkdir -p docs/architecture/modules
rm -rf docs/architecture/modules/*
cp -r node/docs/spec/* docs/architecture/modules/
- name: Update zetacored CLI docs
run: |
mkdir -p docs/architecture/zetacored
rm -rf docs/architecture/zetacored/*
cp -r node/docs/cli/zetacored/* docs/architecture/zetacored/
- name: Update OpenAPI specs
run: |
mkdir -p static/data
rm -rf static/data/openapi.swagger.yaml
cp -r node/docs/openapi/openapi.swagger.yaml static/data/
echo -e "\nhost: zetachain-athens.blockpi.network/lcd/v1/public" >> static/data/openapi.swagger.yaml
rm -rf node
- name: Check for changes
id: check-changes
run: |
git add docs/architecture/modules
git add static/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'