Add release notes for Haystack v2.30.0 (#541) #23
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Dead Link Detection | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| schedule: | |
| - cron: '0 8 * * 1' # Monday 08:00 UTC | |
| workflow_dispatch: | |
| jobs: | |
| check-links: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| steps: | |
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5 | |
| with: | |
| python-version: '3.x' | |
| - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 | |
| with: | |
| node-version: '18' | |
| - uses: peaceiris/actions-hugo@6b1ee2dcc06c9b6629a5317fa0146473914d05e1 # v3 | |
| with: | |
| hugo-version: '0.155.2' | |
| extended: true | |
| - name: Generate content | |
| env: | |
| # GH_USER_NAME secret must exist in repo settings - maps to GITHUB_USER_NAME | |
| # used by build.sh to clone the private advent-of-haystack repo | |
| GITHUB_USER_NAME: ${{ secrets.GH_USER_NAME }} | |
| GH_HAYSTACK_HOME_PAT: ${{ secrets.GH_HAYSTACK_HOME_PAT }} | |
| # build with localhost:1313 base so absolute internal URLs resolve against local server | |
| SITE_URL: localhost:1313 | |
| run: bash -euo pipefail build.sh | |
| - name: Serve built site | |
| run: | | |
| python3 -m http.server 1313 --directory public & | |
| for i in {1..30}; do | |
| curl -fsS http://localhost:1313/ >/dev/null && exit 0 | |
| sleep 1 | |
| done | |
| echo "http.server did not become ready in time" >&2 | |
| exit 1 | |
| - name: Compute link-check scope | |
| id: scope | |
| run: | | |
| if [[ "${{ github.event_name }}" != "pull_request" ]]; then | |
| echo "targets=./public/**/*.html" >> $GITHUB_OUTPUT | |
| exit 0 | |
| fi | |
| git fetch --depth=1 origin ${{ github.event.pull_request.base.sha }} | |
| # Rename or delete → inbound links from other pages may be broken → full check | |
| if git diff --name-status FETCH_HEAD HEAD \ | |
| | grep -qE '^[DR][0-9]*\s.*content/.*\.md'; then | |
| echo "targets=./public/**/*.html" >> $GITHUB_OUTPUT | |
| exit 0 | |
| fi | |
| changed_md=$(git diff --name-only --diff-filter=AM FETCH_HEAD HEAD \ | |
| | grep '^content/.*\.md$' || true) | |
| if [[ -z "$changed_md" ]]; then | |
| echo "targets=./public/**/*.html" >> $GITHUB_OUTPUT | |
| exit 0 | |
| fi | |
| targets="" | |
| while IFS= read -r f; do | |
| rel="${f#content/}" | |
| dir=$(dirname "$rel") | |
| base=$(basename "$rel" .md) | |
| if [[ "$base" == "_index" || "$base" == "index" ]]; then | |
| [[ "$dir" == "." ]] && p="./public/index.html" || p="./public/${dir}/index.html" | |
| elif [[ "$dir" == "pages" ]]; then | |
| p="./public/${base}/index.html" | |
| else | |
| [[ "$dir" == "." ]] && p="./public/${base}/index.html" || p="./public/${dir}/${base}/index.html" | |
| fi | |
| [[ -f "${p#./}" ]] && targets="$targets $p" | |
| done <<< "$changed_md" | |
| if [[ -z "$targets" ]]; then | |
| echo "targets=./public/**/*.html" >> $GITHUB_OUTPUT | |
| else | |
| echo "targets=${targets# }" >> $GITHUB_OUTPUT | |
| fi | |
| - name: Check for broken links | |
| uses: lycheeverse/lychee-action@6da1d14f3a43098a294b7696d93d938aa8d20fc0 # v2.8.0 | |
| with: | |
| args: >- | |
| --no-progress | |
| --root-dir ./public | |
| --format markdown | |
| --remap 'https://localhost:1313 http://localhost:1313' | |
| --exclude 'linkedin\.com' | |
| --exclude 'datacamp\.com' | |
| --exclude 'openai\.com' | |
| --exclude 'mistral\.ai' | |
| --exclude 'huggingface\.co' | |
| ${{ steps.scope.outputs.targets }} | |
| output: lychee-report.md | |
| fail: ${{ github.event_name != 'pull_request' }} # don't block PRs, but fail scheduled/push runs for visibility | |
| - name: Post report as PR comment | |
| if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository | |
| uses: marocchino/sticky-pull-request-comment@0ea0beb66eb9baf113663a64ec522f60e49231c0 # v3.0.4 | |
| with: | |
| header: dead-links | |
| path: lychee-report.md |