-
Notifications
You must be signed in to change notification settings - Fork 7
41 lines (36 loc) · 1.5 KB
/
CI.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
name: CI
on: [push, pull_request]
jobs:
markdownlint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: markdownlint
run: |
echo '{"default": true,"line_length": false,"no-inline-html": false,"first-line-h1": false}' > .markdownlint.json
while IFS= read -r line; do echo "Linting ${line}"; docker run --rm -v "${PWD}:/markdown" -v "${PWD}:${PWD}" 06kellyjac/markdownlint-cli "${PWD}/${line}" || exit 1; done < <(git ls-files '*.md')
yamllint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: yamllint
run: |
while IFS= read -r line; do echo "Linting ${line}"; docker run --rm -v "${PWD}:${PWD}" sdesbure/yamllint yamllint -d '{extends: default, rules: {document-start: {present: false}, line-length: disable}}' "${PWD}/${line}" || exit 1; done < <(git ls-files '*.yaml' '*.yml')
deploy:
needs: [markdownlint, yamllint]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: mkdocs
run: |
docker run --rm -v ${PWD}/site:/site -v ${PWD}:/docs squidfunk/mkdocs-material:5.0.0rc4 build --verbose --clean --strict
sudo cp ${PWD}/CNAME ${PWD}/site/
- name: deploy
if: github.ref == 'refs/heads/master'
uses: peaceiris/[email protected]
env:
ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }}
PUBLISH_BRANCH: gh-pages
PUBLISH_DIR: ./site
with:
emptyCommits: "false"