Update module and OpenAPI specs from zeta-chain/node #89
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: Replace contents of docs/modules | |
run: | | |
mkdir -p docs/architecture/modules | |
rm -rf docs/architecture/modules/* | |
cp -r node/docs/spec/* docs/architecture/modules/ | |
- name: Replace 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' |