(chore): GHA - Various (#1400)
parent
e3e95d7369
commit
fb6b49f986
@ -0,0 +1,18 @@
|
|||||||
|
name: Label Conflicts
|
||||||
|
|
||||||
|
on: [push, pull_request]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
triage:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Check out code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Label Merge Conflicts
|
||||||
|
uses: mschilde/auto-label-merge-conflicts@master
|
||||||
|
with:
|
||||||
|
CONFLICT_LABEL_NAME: "Status: Conflicted"
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
MAX_RETRIES: 5
|
||||||
|
WAIT_MS: 5000
|
@ -1,39 +1,49 @@
|
|||||||
name: Build mkdocs and deploy to GitHub Pages
|
name: Build and Deploy Docs
|
||||||
|
|
||||||
on: [push, pull_request]
|
on: [push, pull_request]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
build:
|
build:
|
||||||
name: Build docs
|
name: Build docs
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3.5.3
|
- name: Checkout repository
|
||||||
- uses: actions/setup-python@v4.6.1
|
uses: actions/checkout@v3.5.3
|
||||||
|
- name: Set up Python
|
||||||
|
uses: actions/setup-python@v4.6.1
|
||||||
with:
|
with:
|
||||||
python-version: 3.x
|
python-version: 3.x
|
||||||
- uses: actions/cache@v3.3.1
|
- name: Cache dependencies
|
||||||
|
uses: actions/cache@v3.3.1
|
||||||
with:
|
with:
|
||||||
key: ${{ github.ref }}
|
|
||||||
path: .cache
|
path: .cache
|
||||||
- run: pip install -r docs/requirements.txt
|
key: ${{ runner.os }}-build-${{ hashFiles('docs/requirements.txt') }}
|
||||||
- run: mkdocs build
|
- name: Install dependencies
|
||||||
|
run: pip install -r docs/requirements.txt
|
||||||
|
- name: Build documentation
|
||||||
|
run: mkdocs build
|
||||||
deploy:
|
deploy:
|
||||||
if: github.event_name == 'push' && contains(fromJson('["refs/heads/master", "refs/heads/main"]'), github.ref)
|
if: github.event_name == 'push' && contains(fromJson('["refs/heads/master", "refs/heads/main"]'), github.ref)
|
||||||
needs: build
|
needs: build
|
||||||
name: Deploy docs
|
name: Deploy docs
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3.5.3
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v3.5.3
|
||||||
with:
|
with:
|
||||||
fetch-depth: '0'
|
fetch-depth: '0'
|
||||||
- uses: actions/setup-python@v4.6.1
|
- name: Set up Python
|
||||||
|
uses: actions/setup-python@v4.6.1
|
||||||
with:
|
with:
|
||||||
python-version: 3.x
|
python-version: 3.x
|
||||||
- uses: actions/cache@v3.3.1
|
- name: Cache dependencies
|
||||||
|
uses: actions/cache@v3.3.1
|
||||||
with:
|
with:
|
||||||
key: ${{ github.ref }}
|
|
||||||
path: .cache
|
path: .cache
|
||||||
- run: pip install -r docs/requirements.txt
|
key: ${{ runner.os }}-build-${{ hashFiles('docs/requirements.txt') }}
|
||||||
- run: mkdocs gh-deploy --force
|
- name: Install dependencies
|
||||||
|
run: pip install -r docs/requirements.txt
|
||||||
|
- name: Deploy to GitHub Pages
|
||||||
|
run: mkdocs gh-deploy --force
|
||||||
|
@ -0,0 +1,14 @@
|
|||||||
|
name: Lint - EditorConfig
|
||||||
|
|
||||||
|
on: [push, pull_request]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
editorconfig-checker:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3.5.3
|
||||||
|
- name: editorconfig-checker
|
||||||
|
run: |
|
||||||
|
docker run --rm \
|
||||||
|
-v "${GITHUB_WORKSPACE}":/check \
|
||||||
|
mstruebing/editorconfig-checker
|
@ -0,0 +1,26 @@
|
|||||||
|
name: Lint - Markdown
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
paths:
|
||||||
|
- "**/*.md"
|
||||||
|
- ".markdownlint.jsonc"
|
||||||
|
pull_request:
|
||||||
|
paths:
|
||||||
|
- "**/*.md"
|
||||||
|
- ".markdownlint.jsonc"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
markdownlint:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3.5.3
|
||||||
|
- name: markdownlint
|
||||||
|
run: |
|
||||||
|
find "${GITHUB_WORKSPACE}" -name '*.md' -exec \
|
||||||
|
docker run --rm \
|
||||||
|
-v "${GITHUB_WORKSPACE}":"${GITHUB_WORKSPACE}" \
|
||||||
|
-v "${GITHUB_WORKSPACE}/.markdownlint.jsonc":"/config/.markdownlint.jsonc" \
|
||||||
|
markdownlint/markdownlint \
|
||||||
|
-c "/config/.markdownlint.jsonc" \
|
||||||
|
{} +
|
@ -0,0 +1,26 @@
|
|||||||
|
name: Lint - YAML
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
paths:
|
||||||
|
- "**/*.yml"
|
||||||
|
pull_request:
|
||||||
|
paths:
|
||||||
|
- "**/*.yml"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
yamllint:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3.5.3
|
||||||
|
|
||||||
|
- name: Run yamllint
|
||||||
|
run: |
|
||||||
|
find "${GITHUB_WORKSPACE}" -name '*.yml' -exec \
|
||||||
|
docker run --rm \
|
||||||
|
-v "${GITHUB_WORKSPACE}":"${GITHUB_WORKSPACE}" \
|
||||||
|
-w "${GITHUB_WORKSPACE}" \
|
||||||
|
peterdavehello/yamllint \
|
||||||
|
yamllint -c yamllint.yml \
|
||||||
|
{} +
|
@ -1,41 +0,0 @@
|
|||||||
name: Lint
|
|
||||||
|
|
||||||
on: [push, pull_request]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
|
|
||||||
editorconfig-checker:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3.5.3
|
|
||||||
- name: editorconfig-checker
|
|
||||||
run: |
|
|
||||||
docker run --rm \
|
|
||||||
-v "${GITHUB_WORKSPACE}":/check \
|
|
||||||
mstruebing/editorconfig-checker
|
|
||||||
|
|
||||||
markdownlint:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3.5.3
|
|
||||||
- name: markdownlint
|
|
||||||
run: |
|
|
||||||
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
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3.5.3
|
|
||||||
- name: yamllint
|
|
||||||
run: |
|
|
||||||
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}}}' \
|
|
||||||
{} +
|
|
@ -0,0 +1,7 @@
|
|||||||
|
extends: default
|
||||||
|
rules:
|
||||||
|
document-start:
|
||||||
|
present: false
|
||||||
|
line-length: disable
|
||||||
|
truthy:
|
||||||
|
check-keys: false
|
Loading…
Reference in new issue