Copy MD Files #358
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: Copy MD Files | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 0,12 * * *' | |
jobs: | |
sync-docs-and-create-pr: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
with: | |
ref: sync-docs | |
fetch-depth: 0 | |
- name: Set Up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
- name: Install Dependencies | |
run: | | |
yarn install --frozen-lockfile | |
- name: Run Sync Script | |
run: | | |
chmod +x sync_script.sh | |
./sync_script.sh | |
- name: Add And Commit | |
uses: EndBug/add-and-commit@v9 | |
with: | |
message: 'Updated MD File Changes from cosmos-sdk/docs' | |
- name: Push To Sync-Docs | |
uses: ad-m/github-push-action@master | |
with: | |
branch: sync-docs | |
- uses: peter-evans/create-pull-request@v5 | |
with: | |
commit-message: "chore: Sync docs from cosmos-sdk/docs" | |
title: "chore: upate documenation from cosmos-sdk/docs" | |
base: main | |
branch: "sync-docs" | |
delete-branch: false | |
body: | | |
This PR updates the documentation from cosmos-sdk/docs | |
sims-notify-failure: | |
permissions: | |
contents: none | |
needs: sync-docs-and-create-pr | |
runs-on: ubuntu-latest | |
if: ${{ failure() }} | |
steps: | |
- name: Notify Slack on failure | |
uses: rtCamp/[email protected] | |
env: | |
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} | |
SLACK_CHANNEL: sdk-sims | |
SLACK_USERNAME: Failed to copy docs from Cosmos SDK to Docs repo | |
SLACK_ICON_EMOJI: ":skull:" | |
SLACK_COLOR: danger | |
SLACK_MESSAGE: Copying docs is failing | |
SLACK_FOOTER: "" |