linkchecker/.github/workflows/branch-man.yml

54 lines
1.6 KiB
YAML

name: Create a branch with updated man pages and application translations
on: workflow_dispatch
jobs:
run:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v2
with:
repository: linkchecker/linkchecker
ref: master
# Needed for hatch-vcs to extract LinkChecker version from tag
# https://github.com/actions/checkout/issues/249
fetch-depth: 0
- name: Install Ubuntu packages
run: sudo apt install gettext git
- name: Setup Python
uses: actions/setup-python@v2
- name: Install Python packages
run: >
pip3 install dnspython beautifulsoup4 requests \
hatch hatch-vcs sphinx sphinx_epytext sphinx_rtd_theme \
sphinx-sitemap sphinx-intl
- name: Prepare git environment
run: |
git config user.email "linkchecker@linkchecker.github.io"
git config user.name "LinkChecker"
git checkout -b man-updates
git remote add local ${{ github.server_url }}/${{ github.repository }}
- name: Build man pages
run: |
hatch -e doc run locale
git commit -a -m "Update doc translation catalogs"
hatch -e doc run man
git commit -a -m "Update man pages"
- name: Build application translations catalogs
run: |
rm -f po/linkchecker.pot
make -C po
git commit -a -m "Update application translation catalogs"
- name: Push changes
run: >
git push --set-upstream local man-updates