Skip to content

Commit

Permalink
Workflow for updating protocol contract docs (#334)
Browse files Browse the repository at this point in the history
  • Loading branch information
fadeev authored Jun 3, 2024
1 parent 08d22ba commit 084972d
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 1 deletion.
44 changes: 44 additions & 0 deletions .github/workflows/update-from-protocol-contracts.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Update protocol contract docs

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/protocol-contracts repository
uses: actions/checkout@v2
with:
repository: zeta-chain/protocol-contracts
path: protocol-contracts

- name: Update docs
run: |
mkdir -p src/pages/architecture/contracts
rm -rf src/pages/architecture/contracts/*
cp -r protocol-contracts/docs/src/* src/pages/architecture/contracts/
- name: Check for changes
id: check-changes
run: |
git add src/pages/architecture/contracts
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 protocol contract docs"
body: |
This PR contains updates to the protocol contract docs.
commit-message: |
"docs: update protocol contract docs"
base: main
branch: docs/updates-from-protocol-contracts
if: steps.check-changes.outputs.changed == 'true'
2 changes: 1 addition & 1 deletion .github/workflows/update-from-zeta-node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v2

- name: Checkout protocol-contracts repository
- name: Checkout zeta-chain/node repository
uses: actions/checkout@v2
with:
repository: zeta-chain/node
Expand Down

0 comments on commit 084972d

Please sign in to comment.