This repository has been archived by the owner on Nov 19, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 68
70 lines (61 loc) · 1.97 KB
/
pull_request.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: LitmusDocs-CI
on:
pull_request:
types: [ opened, synchronize, reopened ]
jobs:
embedmdCheck_and_linksVerification:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: ${{steps.getcommit.outputs.sha}}
- uses: actions/setup-go@v2
with:
stable: 'false'
go-version: '1.14.0'
- name: Links Verification
run: |
go get -u -v github.com/bmuschko/link-verifier
link-verifier --dirs website,README.md,docs --fail=false
- name: Installing and Running embedmed
run: |
sudo apt install boxes
go get github.com/campoy/embedmd
cd docs
embedmd -w $(find *.md)
continue-on-error: true
- name: embedmd check
run: |
export TERM=xterm-256color
count=$(git status -s| wc -l)
if [ "$count" -ne "0" ]
then
tput setaf 1; echo "Error: embedmd check failed"
tput setaf 4; echo "Please check the following files need an embedmd run:"
output=$(git status -s)
echo "$output" | boxes -d stone -p a2v1
tput setaf 3; echo "Please follow the instructions to run embedmd:"
tput setaf 3; echo "cd docs"
tput setaf 3; echo "embedmd -w \$(find *.md)"
tput setaf 6; echo "For more info visit https://github.com/litmuschaos/litmus-docs/blob/master/CONTRIBUTING.md"
exit 1
else
tput setaf 2; echo "Nothing to embed"
fi
shell: sh
Spellcheck:
runs-on: ubuntu-latest
steps:
# The checkout step
- uses: actions/checkout@master
- uses: rojopolis/spellcheck-github-actions@0.11.0
name: Spellcheck
with:
source_files: 'docs/*.md'
task_name: Markdown
ci:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- name: Build
run: docker build -t $GITHUB_REPOSITORY .