Skip to content

Commit

Permalink
[Workflows] Test doc files present in Website (#8)
Browse files Browse the repository at this point in the history
* add workflow for missing docs
  • Loading branch information
jeremmfr authored Nov 26, 2019
1 parent e367314 commit 65a1d1f
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Docs
on: [push, pull_request]
jobs:
website:
name: Website files
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v1
- name: List resource files and Test Website Files exists
run: |
missing=""
for resource in $(ls junos/resource_*.go | grep -v "_test.go$" | cut -d'/' -f2 | cut -d'.' -f1 | sed 's/^resource_//' ) ; do \
if [[ ! -f website/docs/r/${resource}.html.markdown ]] ; then \
missing+="${resource} " ; \
fi ; \
done
if [[ ${missing} != "" ]] ; then \
echo "Missing documentation for ${missing}" ; exit 1 ; \
fi

0 comments on commit 65a1d1f

Please sign in to comment.