-
Notifications
You must be signed in to change notification settings - Fork 61
46 lines (39 loc) · 1.34 KB
/
update-from-toolkit.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: Update Toolkit 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 protocol-contracts repository
uses: actions/checkout@v2
with:
repository: zeta-chain/toolkit
path: toolkit
- name: Update docs
run: |
mkdir -p src/pages/developers/frontend/toolkit
rm -rf src/pages/developers/frontend/toolkit/*
cp -r toolkit/docs/* src/pages/developers/frontend/toolkit/
rm -rf toolkit
- name: Check for changes
id: check-changes
run: |
git add src/pages/developers/frontend/toolkit
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 toolkit docs"
body: |
This PR contains updates to toolkit
from the `zeta-chain/toolkit` repository.
commit-message: |
"docs: update toolkit from zeta-chain/toolkit"
base: main
branch: docs/updates-from-zeta-chain-node
if: steps.check-changes.outputs.changed == 'true'