Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 14 additions & 5 deletions .github/workflows/update-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,17 @@ jobs:
cat docs/dfx-json-schema.json
echo "networks.json schema:"
cat docs/networks-json-schema.json
git config user.name "GitHub Actions Bot"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add docs/dfx-json-schema.json docs/networks-json-schema.json
git commit -m "update dfx-json-schema and networks-json-schema" || true
git push
if [[ $(git status | wc -l) -eq 2 ]]; then
if [[ ${{ github.event.pull_request.head.repo.full_name == github.repository }} ]]; then
git config user.name "GitHub Actions Bot"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add docs/dfx-json-schema.json docs/networks-json-schema.json
git commit -m "update dfx-json-schema and networks-json-schema" || true
git push
else
echo "Schemas are not up to date. Please run the following:"
echo " dfx schema --outfile docs/dfx-json-schema.json"
echo " dfx schema --for networks --outfile docs/networks-json-schema.json"
exit 1
fi
fi