Skip to content

Add PR site preview workflow - #6

Merged
fepegar merged 1 commit into
mainfrom
add-pr-site-preview
Jun 28, 2026
Merged

fepegar merged 1 commit into
mainfrom
add-pr-site-preview

Conversation

@fepegar

@fepegar fepegar commented Jun 28, 2026

Copy link
Copy Markdown
Member

[Generated by a coding agent]


Summary

  • Add a Smokeshow preview workflow for non-main branches.
  • Upload the staged static site from _site and set a commit status.
  • Look up the matching PR and write/update a sticky preview comment.
  • Add mise run build for staging the public site artifact locally and in CI.

Validation

  • mise run build
  • uv run python scripts/check_site.py --external
  • mise run check
  • node --check assets/js/main.js
  • git diff --check

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 28, 2026 22:30
@github-actions

Copy link
Copy Markdown

🌐 Site Preview

Preview of the landing page for this PR:

🔗 https://smokeshow.helpmanual.io/0g5o2j1z3q3s0g2s6m3x/

Built from 4046c05

@fepegar
fepegar merged commit b860dcd into main Jun 28, 2026
4 checks passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds an automated branch preview pipeline for the static torchio.org landing page by staging the site into _site, uploading it to Smokeshow, and posting a sticky PR comment with the preview URL.

Changes:

  • Added a mise run build task to stage the static site into _site.
  • Added a GitHub Actions workflow to upload _site to Smokeshow on non-main pushes and comment the matching PR with the preview link.
  • Documented the new local build/staging command in the README.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
README.md Documents mise run build for staging the public site artifact locally.
mise.toml Adds a build task that stages the site content into _site (matching the deploy artifact structure).
.github/workflows/preview.yml New workflow to build _site, upload to Smokeshow, find the matching PR, and post/update a sticky preview comment.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +41 to +44
SMOKESHOW_AUTH_KEY: ${{ secrets.SMOKESHOW_AUTH_KEY || env.SMOKESHOW_AUTH_KEY }}
SMOKESHOW_GITHUB_STATUS_DESCRIPTION: Site preview
SMOKESHOW_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SMOKESHOW_GITHUB_PR_HEAD_SHA: ${{ github.sha }}
Comment on lines +45 to +48
run: |
uvx smokeshow upload ./_site 2>&1 | tee /tmp/smokeshow_output.txt
URL=$(grep -oE 'https://smokeshow[^ ]+' /tmp/smokeshow_output.txt | tail -1 | sed 's/,$//')
echo "preview_url=$URL" >> "$GITHUB_OUTPUT"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants