-
Notifications
You must be signed in to change notification settings - Fork 22
70 lines (59 loc) · 1.74 KB
/
copy-md.yml
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: Copy MD Files
on:
workflow_dispatch:
schedule:
- cron: "0 0,12 * * *"
env:
PR_BRANCH_NAME: "sync-docs-${{ github.sha }}"
jobs:
sync-docs-and-create-pr:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Run TEST
run: echo $PR_BRANCH_NAME
- name: Checkout Repository
uses: actions/checkout@v4
- name: Set Up Node.js
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install Dependencies
run: |
yarn install --frozen-lockfile
- name: Run Sync Script
run: |
chmod +x sync_script.sh
./sync_script.sh
- name: Run Tutorials Script
run: |
chmod +x tutorials-script.sh
./tutorials-script.sh
- uses: peter-evans/create-pull-request@v6
with:
commit-message: "chore: Sync docs from cosmos-sdk/docs"
title: "chore: update documentation from cosmos-sdk/docs"
base: main
branch: ${{ env.PR_BRANCH_NAME }}
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/action-slack-notify@v2.2.1
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: ""