Skip to content

Add post: When AI Doctors See What Isn't There (visual grounding in medical VLMs) #22

Add post: When AI Doctors See What Isn't There (visual grounding in medical VLMs)

Add post: When AI Doctors See What Isn't There (visual grounding in medical VLMs) #22

# Fork PR previews: workflow file and gate jobs always run from the default branch
# (pull_request_target). Build runs with minimal permissions; deploy publishes only the
# uploaded _site artifact. Configure GitHub Environment "fork-pr-preview" with required
# reviewers from @Cohere-Labs-Community/blog-owners before fork previews can deploy.
name: PR preview fork
on:
pull_request_target:
branches:
- master
- main
types:
- opened
- synchronize
- reopened
paths:
- "assets/**"
- "_sass/**"
- "_scripts/**"
- "**.bib"
- "**.html"
- "**.js"
- "**.liquid"
- "**/*.md"
- "**.yml"
- "Gemfile"
- "Gemfile.lock"
- "!.github/workflows/axe.yml"
- "!.github/workflows/broken-links.yml"
- "!.github/workflows/deploy-docker-tag.yml"
- "!.github/workflows/deploy-image.yml"
- "!.github/workflows/docker-slim.yml"
- "!.github/workflows/lighthouse-badger.yml"
- "!.github/workflows/prettier.yml"
- "!lighthouse_results/**"
- "!CONTRIBUTING.md"
- "!CUSTOMIZE.md"
- "!FAQ.md"
- "!INSTALL.md"
- "!README.md"
concurrency:
group: pr-preview-fork-${{ github.event.pull_request.number }}
cancel-in-progress: true
permissions: {}
jobs:
fork-gate:
if: github.event.pull_request.head.repo.full_name != github.repository
runs-on: ubuntu-latest
environment: fork-pr-preview
steps:
- name: Approved for fork PR preview
run: echo "Environment approval granted; build may run."
fork-build:
if: github.event.pull_request.head.repo.full_name != github.repository
needs: fork-gate
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout fork PR head πŸ›ŽοΈ
uses: actions/checkout@v5
with:
ref: ${{ github.event.pull_request.head.sha }}
persist-credentials: false
- name: Setup Ruby πŸ’Ž
uses: ruby/setup-ruby@v1
with:
ruby-version: "3.3.5"
bundler-cache: true
- name: Update _config.yml βš™οΈ
uses: fjogeleit/yaml-update-action@main
with:
commitChange: false
valueFile: "_config.yml"
propertyPath: "giscus.repo"
value: ${{ github.repository }}
- name: Install and Build πŸ”§
env:
PR_BASEURL: /blog/pr-preview/pr-${{ github.event.pull_request.number }}
run: |
export JEKYLL_ENV=production
bundle exec jekyll build --baseurl "$PR_BASEURL" --future
- name: Purge unused CSS 🧹
run: |
npm install -g purgecss
purgecss -c purgecss.config.js
- name: Upload site artifact πŸ“¦
uses: actions/upload-artifact@v6
with:
name: pr-site-fork-${{ github.event.pull_request.number }}
path: _site
retention-days: 3
fork-deploy:
if: github.event.pull_request.head.repo.full_name != github.repository
needs: fork-build
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
# JamesIves/github-pages-deploy-action runs local `git config` and needs a git work tree.
- name: Checkout πŸ›ŽοΈ
uses: actions/checkout@v5
with:
fetch-depth: 1
- name: Download site artifact πŸ“₯
uses: actions/download-artifact@v7
with:
name: pr-site-fork-${{ github.event.pull_request.number }}
path: _site
- name: Deploy fork PR preview πŸš€
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: _site
target-folder: pr-preview/pr-${{ github.event.pull_request.number }}
branch: gh-pages
# github.repository_owner can be mixed-case for orgs; *.github.io hostnames must be lowercase.
- name: Pages owner (lowercase) πŸ”‘
id: pages_owner
env:
REPO_OWNER: ${{ github.repository_owner }}
run: echo "lc=$(printf '%s' "$REPO_OWNER" | tr '[:upper:]' '[:lower:]')" >> "$GITHUB_OUTPUT"
- name: Comment PR preview URL πŸ’¬
uses: thollander/actions-comment-pull-request@v2
with:
comment_tag: pr-preview
pr_number: ${{ github.event.pull_request.number }}
message: |
**PR preview (fork)** (updates after each approved deploy):
https://${{ steps.pages_owner.outputs.lc }}.github.io/blog/pr-preview/pr-${{ github.event.pull_request.number }}/