forked from MystenLabs/sui
-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (44 loc) · 1.52 KB
/
docs.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
name: Documentation
on:
push:
branches: [ main, extensions ]
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
jobs:
diff:
runs-on: [ubuntu-latest]
outputs:
isDoc: ${{ steps.diff.outputs.isDoc }}
isOldDoc: ${{ steps.diff.outputs.isOldDoc }}
isExamples: ${{ steps.diff.outputs.isExamples }}
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # Pin v4.1.1
- name: Detect Changes
uses: './.github/actions/diffs'
id: diff
examples:
name: Notify Slack if examples directory changed
needs: diff
if: needs.diff.outputs.isExamples == 'true'
runs-on: [ubuntu-latest]
steps:
- name: Notify Slack of Examples Changes
uses: slackapi/slack-github-action@37ebaef184d7626c5f204ab8d3baff4262dd30f0 # [email protected]
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
with:
channel-id: 'tech-docs'
slack-message: |
An open PR modifies files in the `examples/` directory.
Please review it: <https://github.com/${{ github.repository }}/pull/${{ github.event.number }}|PR${{ github.event.number }}>
spelling:
name: Lint documentation
needs: diff
if: needs.diff.outputs.isDoc == 'true'
runs-on: [ubuntu-latest]
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # Pin v4.1.1
- name: Spell Check Docs
uses: crate-ci/[email protected]
with:
files: ./docs/content