Merge pull request #773 from nemchik/workflows

Workflows
pull/776/head
TRaSH 2 years ago committed by GitHub
commit c65a2870c9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,12 +1,27 @@
name: Deploy docs to GitHub Pages via mkdocs
name: Build mkdocs and deploy to GitHub Pages
on:
push:
branches:
- master
on: [push, pull_request]
jobs:
build:
name: Build docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: 3.x
- uses: actions/cache@v2
with:
key: ${{ github.ref }}
path: .cache
- run: pip install -r docs/requirements.txt
- run: mkdocs build
deploy:
if: github.event_name == 'push' && contains(fromJson('["refs/heads/master", "refs/heads/main"]'), github.ref)
needs: build
name: Deploy docs
runs-on: ubuntu-latest
steps:
@ -16,5 +31,9 @@ jobs:
- uses: actions/setup-python@v4
with:
python-version: 3.x
- uses: actions/cache@v2
with:
key: ${{ github.ref }}
path: .cache
- run: pip install -r docs/requirements.txt
- run: mkdocs gh-deploy --force

@ -3,13 +3,16 @@ name: Lint
on: [push, pull_request]
jobs:
editorconfig-checker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: editorconfig-checker
run: |
docker run --rm -v ${GITHUB_WORKSPACE}:/check mstruebing/editorconfig-checker
docker run --rm \
-v "${GITHUB_WORKSPACE}":/check \
mstruebing/editorconfig-checker
markdownlint:
runs-on: ubuntu-latest
@ -17,7 +20,12 @@ jobs:
- uses: actions/checkout@v3
- name: markdownlint
run: |
find ~+ ${github_workspace} -name '*.md' | xargs docker run --rm -v ${GITHUB_WORKSPACE}:${GITHUB_WORKSPACE} markdownlint/markdownlint -r ~MD013,~MD033,~MD034,~MD046,~MD002,~MD041
find "${GITHUB_WORKSPACE}" -name '*.md' -exec \
docker run --rm \
-v "${GITHUB_WORKSPACE}":"${GITHUB_WORKSPACE}" \
markdownlint/markdownlint \
-r ~MD013,~MD033,~MD034,~MD046,~MD002,~MD041 \
{} +
yamllint:
runs-on: ubuntu-latest
@ -25,4 +33,9 @@ jobs:
- uses: actions/checkout@v3
- name: yamllint
run: |
find ~+ ${github_workspace} -name '*.yaml' -o -name '*.yml' | xargs docker run --rm -v ${GITHUB_WORKSPACE}:${GITHUB_WORKSPACE} peterdavehello/yamllint yamllint -d '{extends: default, rules: {document-start: {present: false}, line-length: disable}}'
find "${GITHUB_WORKSPACE}" -name '*.yaml' -o -name '*.yml' -exec \
docker run --rm \
-v "${GITHUB_WORKSPACE}":"${GITHUB_WORKSPACE}" \
peterdavehello/yamllint \
yamllint -d '{"extends":"default","rules":{"document-start":{"present":false},"line-length":"disable","truthy":{"check-keys":false}}}' \
{} +

1
.gitignore vendored

@ -1,3 +1,4 @@
.cache
venv/
mkdocs-dev-server.bat
/docs/Notifiarr/preview.bat

Loading…
Cancel
Save