Skip to content

Redeploy button#595

Merged
ajolipa merged 4 commits intoRB-clerk-authfrom
cm/rebuild-function
Mar 26, 2026
Merged

Redeploy button#595
ajolipa merged 4 commits intoRB-clerk-authfrom
cm/rebuild-function

Conversation

@camdendotlol
Copy link
Copy Markdown
Contributor

Summary

This PR adds a new redeploy button to the Tina settings page when running with Clerk authentication. The functionality is provided by an edge function that talks to Netlify's API using a personal access token. Use of this feature will require a NETLIFY_TOKEN environment variable to be present.

Some notes on the edge function's behavior:

  • it checks that the user is in TINA_PUBLIC_CLERK_ORG_ID and is an admin of that org, and will return a 401 error if not
    • this is the same check used by the settings page that the button lives on, so we don't need any extra visibility logic on the frontend
  • before triggering a build, the function checks for any currently-running builds. If a build is already running, it returns some helper text instead of triggering another one

Screenshot

(in this case, there's a message indicating that a build is already running)

Screenshot 2026-03-26 at 3 11 36 PM

@netlify
Copy link
Copy Markdown

netlify Bot commented Mar 26, 2026

Deploy Preview for padp-staging ready!

Name Link
🔨 Latest commit 51309ec
🔍 Latest deploy log https://app.netlify.com/projects/padp-staging/deploys/69c586a2f55ec9000809a462
😎 Deploy Preview https://deploy-preview-595--padp-staging.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@camdendotlol camdendotlol marked this pull request as ready for review March 26, 2026 19:20
@camdendotlol camdendotlol requested a review from ajolipa March 26, 2026 19:20
Copy link
Copy Markdown
Contributor

@ajolipa ajolipa left a comment

Choose a reason for hiding this comment

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

Code looks good, so I'll go ahead and merge this so it can be tested on the RB-clerk-auth branch.

@ajolipa ajolipa merged commit 78846fc into RB-clerk-auth Mar 26, 2026
4 checks passed
@ajolipa ajolipa mentioned this pull request Apr 15, 2026
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