sintonia/.github/workflows/docs.yml

79 lines
1.8 KiB
YAML
Raw Permalink Normal View History

2022-04-10 16:26:28 +02:00
name: Docs
on:
push:
branches: [main, stable-*]
2022-04-10 16:26:28 +02:00
paths:
- .github/vale/**
2022-04-10 16:26:28 +02:00
- .github/workflows/docs.yml
- docs/**
2022-04-10 16:26:28 +02:00
pull_request:
branches: [main, stable-*]
paths:
- .github/vale/**
- .github/workflows/docs.yml
- docs/**
2022-04-10 16:26:28 +02:00
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
2022-04-10 16:26:28 +02:00
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
2022-09-01 19:39:32 +02:00
- uses: actions/cache@v4
2022-09-01 19:39:32 +02:00
with:
path: |
/usr/local/bin/vale*
key: ${{ runner.os }}-docs-lint-tools
restore-keys: |
${{ runner.os }}-docs-lint-tools
2022-04-10 16:26:28 +02:00
- name: Install Vale
run: |
2022-09-01 19:39:32 +02:00
python -m venv venv && source venv/bin/activate
pip install gh-release-install
sudo venv/bin/gh-release-install \
2022-04-10 16:26:28 +02:00
errata-ai/vale \
vale_{version}_Linux_64-bit.tar.gz --extract vale \
2022-09-01 19:39:32 +02:00
/usr/local/bin/vale \
2022-12-20 15:47:39 +01:00
--version v2.21.3 \
2022-09-01 19:39:32 +02:00
--version-file '{destination}.version'
2022-04-10 16:26:28 +02:00
- name: Add annotations matchers
run: |
echo "::add-matcher::.github/annotations/vale.json"
- name: Run Vale
run: |
vale sync
2022-12-19 16:41:01 +01:00
vale --output line docs || true
vale --output line --minAlertLevel=error docs/releases
sync:
name: Sync
if: >
github.repository_owner == 'libretime' &&
github.event_name == 'push'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/checkout@v4
with:
repository: libretime/website
path: website
ssh-key: "${{ secrets.WEBSITE_DEPLOY_KEY }}"
- name: Sync docs changes
run: tools/ci-sync-docs.sh ${{ github.event.before }}..${{ github.sha }}