qBittorrent/.github/workflows/ci_file_health.yaml

45 lines
1.4 KiB
YAML
Raw Normal View History

2021-08-12 20:45:50 +03:00
name: CI - File health
2021-02-04 11:15:31 +03:00
on: [pull_request, push]
permissions: {}
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: ${{ github.head_ref != '' }}
jobs:
ci:
name: Check
runs-on: ubuntu-latest
steps:
2021-08-14 09:54:15 +03:00
- name: Checkout repository
2023-09-05 14:42:07 +03:00
uses: actions/checkout@v4
2021-08-14 09:56:37 +03:00
- name: Install tools
uses: actions/setup-python@v5
2022-08-19 07:59:13 +03:00
with:
python-version: "*"
- name: Check files
uses: pre-commit/action@v3.0.1
- name: Check doc
env:
pandoc_path: "${{ github.workspace }}/../pandoc"
run: |
# install pandoc
curl \
-L \
-o "${{ runner.temp }}/pandoc.tar.gz" \
"https://github.com/jgm/pandoc/releases/download/3.4/pandoc-3.4-linux-amd64.tar.gz"
tar -xf "${{ runner.temp }}/pandoc.tar.gz" -C "${{ github.workspace }}/.."
mv "${{ github.workspace }}/.."/pandoc-* "${{ env.pandoc_path }}"
# run pandoc
for lang in doc/*/; do
"${{ env.pandoc_path }}/bin/pandoc" -f markdown -t man -s "$lang/qbittorrent.1.md" -o "$lang/qbittorrent.1"
"${{ env.pandoc_path }}/bin/pandoc" -f markdown -t man -s "$lang/qbittorrent-nox.1.md" -o "$lang/qbittorrent-nox.1"
done
# check diff, ignore "Automatically generated by ..." part
git diff -I '\.\\".*' --exit-code