-
Notifications
You must be signed in to change notification settings - Fork 80
60 lines (53 loc) · 1.74 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
name: LitmusDocs-CI
on:
pull_request:
types: [opened, synchronize, reopened]
paths:
- "website/**"
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 --fail=false
- name: Installing and Running embedmed
run: |
sudo apt install boxes
go get github.com/campoy/embedmd
cd website/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 website/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
ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build
run: docker build -t $GITHUB_REPOSITORY .