Skip to content

20241007 update toolchain 2025 (#209) #2290

20241007 update toolchain 2025 (#209)

20241007 update toolchain 2025 (#209) #2290

Workflow file for this run

name: Docs
on: [push, pull_request, workflow_dispatch]
jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install dependencies
run: |
pip install sphinx==8.1.3 sphinx_rtd_theme==3.0.0 sphinx-favicon myst_parser==4.0.0 sphinx_sitemap sphinxcontrib.newsfeed
- name: Sphinx build
run: |
sphinx-build -W --keep-going doc _build
if [ $? -ne 0 ]; then
echo -e "\033[1;31mSphinx build FAILED\033[0m\n"
exit 1
else
echo -e "\033[1;32mSphinx build PASSED\033[0m\n"
fi
- name: Insert RSS link into news page HTML header
run: |
sed -i 's|</head>| <link rel="alternate" type="application/rss+xml" title="ZEISS INSPECT Add-on Python API News Feed" href="../index.rss" />\n</head>|' _build/news/news.html
- name: Set branch name
id: branch
run: echo "SUBDIR_NAME=${GITHUB_REF##*/}" >> $GITHUB_ENV
- name: Replace main by 2025 in canonical link
run: |
find . -type f -name "*.html" -exec sed -i 's@<link rel="canonical" href="https://zeissiqs\.github\.io/zeiss-inspect-addon-api/main/@<link rel="canonical" href="https://zeissiqs\.github\.io/zeiss-inspect-addon-api/2025/@' {} +
- name: Deploy
if: ${{ github.event_name != 'pull_request' }}
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: _build/
destination_dir: ${{ env.SUBDIR_NAME }}
full_commit_message: Deploy documentation of '${{ env.SUBDIR_NAME }}' to GitHub Pages
- name: Checkout gh-pages
uses: actions/checkout@v4
with:
ref: gh-pages
# NOTE:
# Targets behind login page cannot be checked!!!
# * software-store.zeiss.com/products/apps/
# * techguide.zeiss.com
# * training.gom.com
- name: Linkcheck
id: lychee
if: ${{ env.SUBDIR_NAME != 'merge' }}
uses: lycheeverse/lychee-action@v2
with:
args: --base . --verbose --no-progress '${{ env.SUBDIR_NAME }}/**/*.html'