Skip to content

ci: migrate deploy workflow to new deno-deploy flow - #27

Merged
gentlementlegen merged 10 commits into
developmentfrom
issue-17-deno-deploy-workflow
Apr 10, 2026
Merged

gentlementlegen merged 10 commits into
developmentfrom
issue-17-deno-deploy-workflow

Conversation

@gentlementlegen

@gentlementlegen gentlementlegen commented Apr 7, 2026 •

Copy link
Copy Markdown
Member

Summary

  • switch the deploy workflow to the new provision / publish-manifest / delete deno-deploy flow
  • add the routed Deno manifest publication trigger
  • replace the legacy deployctl-era inputs with the new Deno Deploy action inputs

Notes

-this references ubiquity-os/deno-deploy@issue-17-deno-deploy-app-migration until that PR is merged
-this workflow now expects DENO_DEPLOY_TOKEN

Closes ubiquity-os/deno-deploy#17
Depends on ubiquity-os/deno-deploy#30

@coderabbitai

coderabbitai Bot commented Apr 7, 2026 •

Copy link
Copy Markdown

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

The CI workflow was restructured: the single deploy job was split into resolve-context (logic-only), publish-action-artifact, and deploy-deno, with needs and outputs controlling flow. resolve-context centralizes decision logic (computes artifact/deno environments, actions, and gating booleans) and reduces its permissions to read-all. The action publish step now invokes ubiqlity-os/action-deploy-plugin using resolve-context outputs; the Deno job runs conditionally, uses ubiquity-os/deno-deploy@issue-17-deno-deploy-app-migration, and hardcodes entrypoint: src/worker.ts. Package metadata, Node engine, and SDK versions were bumped; src/worker.ts now injects homepage_url into a runtime manifest; JSON imports were updated with assertions.

Possibly related PRs

  • command-demo PR 22: Modifies the same GitHub Actions workflow and consolidates deployment logic and job structure overlapping this change.
  • command-demo PR 26: Updates the workflow’s environment/ref resolution and deployment decision flow, touching the same CI configuration and related package/knip changes.
🚥 Pre-merge checks | ✅ 1 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ⚠️ Warning PR description is missing the required issue link. Template requires 'Resolves #' keyword with issue number. Add 'Resolves #' with the issue number at the top of the description. The PR notes reference ubiquity-os/deno-deploy#17, so update to: 'Resolves ubiquity-os/deno-deploy#17' or use the appropriate issue number.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title 'ci: migrate deploy workflow to new deno-deploy flow' clearly describes the main change: migrating the CI workflow to use a new Deno Deploy approach. This accurately reflects the primary objective shown in the changeset.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch issue-17-deno-deploy-workflow

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 4


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 126cbe77-89b1-4608-bfed-c8996cbc4a97

📥 Commits

Reviewing files that changed from the base of the PR and between b81af2d and b6eae14.

📒 Files selected for processing (1)
  • .github/workflows/update-configuration.yml

Comment on lines +103 to +115
if [[ "${{ github.event_name }}" == "delete" ]]; then
artifact_action="delete"
deno_action="delete"
fi

should_publish_action_artifact="false"
if [[ "$BUILD_ACTION_ENABLED" == "true" && "$IS_TAG_REF" != "true" && "$IS_DIST_REF" != "true" ]]; then
should_publish_action_artifact="true"
fi

should_run_deno="false"
if [[ "$DEPLOY_DENO_ENABLED" == "true" && "$IS_TAG_REF" != "true" && "$IS_DIST_REF" != "true" ]]; then
should_run_deno="true"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Delete cleanup should not depend on the deploy toggles.

On delete events, Lines 103-105 switch both jobs to delete, but Lines 108-115 still require BUILD_ACTION_ENABLED / DEPLOY_DENO_ENABLED to be true. If either flag is turned off after a ref was provisioned, deletion leaves the dist branch and Deno app orphaned.

Suggested fix
           should_publish_action_artifact="false"
-          if [[ "$BUILD_ACTION_ENABLED" == "true" && "$IS_TAG_REF" != "true" && "$IS_DIST_REF" != "true" ]]; then
+          if [[ "${{ github.event_name }}" == "delete" && "$IS_TAG_REF" != "true" && "$IS_DIST_REF" != "true" ]]; then
+            should_publish_action_artifact="true"
+          elif [[ "$BUILD_ACTION_ENABLED" == "true" && "$IS_TAG_REF" != "true" && "$IS_DIST_REF" != "true" ]]; then
             should_publish_action_artifact="true"
           fi

           should_run_deno="false"
-          if [[ "$DEPLOY_DENO_ENABLED" == "true" && "$IS_TAG_REF" != "true" && "$IS_DIST_REF" != "true" ]]; then
+          if [[ "${{ github.event_name }}" == "delete" && "$IS_TAG_REF" != "true" && "$IS_DIST_REF" != "true" ]]; then
+            should_run_deno="true"
+          elif [[ "$DEPLOY_DENO_ENABLED" == "true" && "$IS_TAG_REF" != "true" && "$IS_DIST_REF" != "true" ]]; then
             should_run_deno="true"
           fi
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
if [[ "${{ github.event_name }}" == "delete" ]]; then
artifact_action="delete"
deno_action="delete"
fi
should_publish_action_artifact="false"
if [[ "$BUILD_ACTION_ENABLED" == "true" && "$IS_TAG_REF" != "true" && "$IS_DIST_REF" != "true" ]]; then
should_publish_action_artifact="true"
fi
should_run_deno="false"
if [[ "$DEPLOY_DENO_ENABLED" == "true" && "$IS_TAG_REF" != "true" && "$IS_DIST_REF" != "true" ]]; then
should_run_deno="true"
if [[ "${{ github.event_name }}" == "delete" ]]; then
artifact_action="delete"
deno_action="delete"
fi
should_publish_action_artifact="false"
if [[ "${{ github.event_name }}" == "delete" && "$IS_TAG_REF" != "true" && "$IS_DIST_REF" != "true" ]]; then
should_publish_action_artifact="true"
elif [[ "$BUILD_ACTION_ENABLED" == "true" && "$IS_TAG_REF" != "true" && "$IS_DIST_REF" != "true" ]]; then
should_publish_action_artifact="true"
fi
should_run_deno="false"
if [[ "${{ github.event_name }}" == "delete" && "$IS_TAG_REF" != "true" && "$IS_DIST_REF" != "true" ]]; then
should_run_deno="true"
elif [[ "$DEPLOY_DENO_ENABLED" == "true" && "$IS_TAG_REF" != "true" && "$IS_DIST_REF" != "true" ]]; then
should_run_deno="true"
fi

Comment on lines +141 to +145
action: ${{ needs.resolve-context.outputs.artifact_action }}
treatAsEsm: true
sourcemap: true
pluginEntry: "${{ github.workspace }}/src/action.ts"
excludeSupportedEvents: ${{ env.EXCLUDE_SUPPORTED_EVENTS }}
skipBotEvents: ${{ env.SKIP_BOT_EVENTS }}
pluginEntry: "${{ github.workspace }}/src/worker.ts"
excludeSupportedEvents: ${{ needs.resolve-context.outputs.exclude_supported_events }}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🌐 Web query:

Does ubiquity-os/action-deploy-pluginsupportpluginEntryfiles that default-export a Deno-style{ fetch(request, env, executionCtx) {} }object, or mustpluginEntrydefault-export the ActionsPlugincreated bycreateActionsPlugin()?

💡 Result:

ubiquity-os/action-deploy-plugin (via its manifest-generation step) expects your pluginEntry module to contain a createPlugin<...>(...) call (preferred) or a createActionsPlugin<...>(...) call (fallback); it derives metadata by inspecting that entrypoint callsite and fails if it can’t find one. (github.com)

So a pluginEntry that only default-exports a Deno/Workers-style object like:

export default { fetch(request, env, executionCtx) { /*...*/ } };

is not supported for manifest generation, because it provides no createPlugin / createActionsPlugin callsite to inspect. (github.com)

Separately: the action’s build step just bundles whatever pluginEntry points to for a Node (GitHub Actions) target. (github.com) If your intent is an Actions plugin, your entrypoint should therefore be an Actions Plugin created by createActionsPlugin() (or createPlugin()), not a Deno fetch handler object. (github.com)

Citations:


Fix pluginEntry to use src/action.ts instead of src/worker.ts.

action-deploy-plugin requires pluginEntry to contain a createPlugin() or createActionsPlugin() call for manifest generation. The Deno-style fetch handler in src/worker.ts is incompatible; the workflow targets Node (GitHub Actions), not Deno. Use the Actions plugin from src/action.ts.

Change pluginEntry
-          pluginEntry: "${{ github.workspace }}/src/worker.ts"
+          pluginEntry: "${{ github.workspace }}/src/action.ts"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
action: ${{ needs.resolve-context.outputs.artifact_action }}
treatAsEsm: true
sourcemap: true
pluginEntry: "${{ github.workspace }}/src/action.ts"
excludeSupportedEvents: ${{ env.EXCLUDE_SUPPORTED_EVENTS }}
skipBotEvents: ${{ env.SKIP_BOT_EVENTS }}
pluginEntry: "${{ github.workspace }}/src/worker.ts"
excludeSupportedEvents: ${{ needs.resolve-context.outputs.exclude_supported_events }}
action: ${{ needs.resolve-context.outputs.artifact_action }}
treatAsEsm: true
sourcemap: true
pluginEntry: "${{ github.workspace }}/src/action.ts"
excludeSupportedEvents: ${{ needs.resolve-context.outputs.exclude_supported_events }}

Comment on lines +156 to +163
permissions: write-all
environment: ${{ needs.resolve-context.outputs.deno_environment }}

- uses: ubiquity-os/deno-plugin-adapter@main
if: ${{ env.DEPLOY_DENO_ENABLED == 'true' && steps.refs.outputs.is_tag_ref != 'true' && steps.refs.outputs.is_artifact_ref != 'true' && github.event_name != 'delete' }}
id: adapter
with:
pluginEntry: "./worker"
steps:
- uses: actions/checkout@v6
if: ${{ needs.resolve-context.outputs.deno_action != 'delete' }}

- uses: ubiquity-os/deno-deploy@main
if: ${{ env.DEPLOY_DENO_ENABLED == 'true' && steps.refs.outputs.is_tag_ref != 'true' && steps.refs.outputs.is_artifact_ref != 'true' }}
- uses: ubiquity-os/deno-deploy@issue-17-deno-deploy-app-migration

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "actions/checkout@v6 => $(gh api repos/actions/checkout/commits/v6 --jq '.sha')"
echo "ubiquity-os/deno-deploy@issue-17-deno-deploy-app-migration => $(gh api repos/ubiquity-os/deno-deploy/commits/issue-17-deno-deploy-app-migration --jq '.sha')"

Repository: ubiquity-os/command-demo

Length of output: 457


🏁 Script executed:

#!/bin/bash
# Check if the refs are accessible and verify their nature
# GitHub Actions official actions use semver tags which are mutable by design
# Let's at least confirm the repository exists and refs are accessible

# For actions/checkout - this is a well-known GitHub-maintained action
# v6 is a major version tag, which is intentionally mutable (points to latest v6.x)
echo "=== Checking actions/checkout structure ==="
curl -s https://api.github.com/repos/actions/checkout/git/refs/tags/v6 | head -20 || echo "API rate limited or unavailable"

# For ubiquity-os/deno-deploy - check if this is a branch or tag
echo ""
echo "=== Checking ubiquity-os/deno-deploy refs ==="
curl -s https://api.github.com/repos/ubiquity-os/deno-deploy/branches/issue-17-deno-deploy-app-migration | grep -E '"name"|"commit"' || echo "Checking alternative..."

Repository: ubiquity-os/command-demo

Length of output: 674


🌐 Web query:

GitHub Actions checkout v6 pinning security recommendation

💡 Result:

GitHub’s security-hardening guidance is to pin GitHub Actions to a full-length commit SHA (not a mutable tag like @v6) so your workflow can’t silently pick up a changed/malicious tag. (docs.github.com)

What to do for actions/checkout@v6

Instead of:

- uses: actions/checkout@v6

Pin to the exact commit SHA for the v6 release (and keep the human-readable version in a comment so Dependabot can update it):

- uses: actions/checkout@<FULL_40_CHAR_SHA> # v6

GitHub explicitly notes that only full-length commit SHAs are immutable for actions. (docs.github.com)

How to get the SHA for the v6 tag

Resolve the tag to a commit, then paste the 40-character SHA into your workflow (for example, by looking up the v6 tag / release in the actions/checkout repo). (github.com)

Optional enforcement (org/repo policy)

GitHub Actions policy can be configured to require SHA pinning, causing workflows that use tags (like @v6) to fail. (github.blog)

Citations:


🌐 Web query:

GitHub Actions workflow security mutable refs supply chain

💡 Result:

Why mutable refs are a supply-chain risk in GitHub Actions

  • If your workflow uses an action like uses: owner/repo@main or @v4 (branch/tag), that reference can later be moved to different code. Your next run may execute attacker-controlled code if the action repo (or publisher account) is compromised, or if a tag is retargeted. GitHub explicitly recommends pinning actions to full-length commit SHAs because SHAs are immutable. [1][2]
  • This is the CI/CD analogue of “unpinned dependencies”: your workflow’s behavior can change without any change in your repo, undermining review/audit trails. [1][2]

Primary mitigation: pin to full commit SHAs (immutable)

Use:

- uses: actions/checkout@<full-length-commit-sha>

GitHub documents SHA pinning as the most secure option (tags are more convenient but mutable). [2][1]

Enforce it with policy (org/repo controls)

GitHub Actions policy can require that actions (and reusable workflows) are pinned to full SHAs—workflows that aren’t pinned can be blocked/fail. [3][2]

Complementary hardening (because pinning alone isn’t the whole story)

  • Least-privilege GITHUB_TOKEN / permissions: reduce the blast radius if something malicious runs. [4]
  • Prefer OIDC + short-lived cloud creds over long-lived secrets in CI. [2]
  • Treat artifacts/inputs from other workflows as untrusted (especially with workflow_run patterns). [1]

Emerging direction (GitHub roadmap)

GitHub has described work toward a workflow-level dependency locking mechanism (a dependencies: section) intended to lock direct/transitive workflow dependencies to SHAs to improve auditability and reduce mutable-ref risk. [5]

Key takeaway: avoid @main, @master, and floating tags like @v4 for third-party actions; pin to full SHAs and enforce pinning via policy, then tighten token/secret exposure. [2][3][4]

Sources

[1] GitHub Well-Architected – Securing GitHub Actions Workflows: https://wellarchitected.github.com/library/application-security/recommendations/actions-security/
[2] GitHub Docs – Security hardening for GitHub Actions (pin to full SHA, OIDC, etc.): https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions
[3] GitHub Changelog – Actions policy supports blocking + SHA pinning: https://github.blog/changelog/2025-08-15-github-actions-policy-now-supports-blocking-and-sha-pinning-actions/
[4] GitHub Blog – Workflow security tips (permissions tightening, injections, etc.): https://github.blog/security/supply-chain-security/four-tips-to-keep-your-github-actions-workflows-secure/
[5] GitHub Blog – GitHub Actions 2026 security roadmap (dependency locking concept): https://github.blog/news-insights/product-news/whats-coming-to-our-github-actions-2026-security-roadmap/


Pin these action refs to commit SHAs.

actions/checkout@v6 and ubiquity-os/deno-deploy@issue-17-deno-deploy-app-migration are mutable refs. In a deploy job with write-all permissions and deployment secrets, this is a supply-chain risk—a compromised action or retargeted tag could execute malicious code with full repository access.

Replace with:

  • actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd (current v6 SHA)
  • ubiquity-os/deno-deploy@<current-branch-sha> (resolve issue-17-deno-deploy-app-migration to its current commit SHA)

GitHub's security guidance recommends pinning to full-length commit SHAs for all actions in privileged workflows.

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 86e69298-d21e-42dd-8547-39a1f7c7c612

📥 Commits

Reviewing files that changed from the base of the PR and between b6eae14 and 077e777.

⛔ Files ignored due to path filters (1)
  • bun.lock is excluded by !**/*.lock
📒 Files selected for processing (4)
  • package.json
  • src/worker.ts
  • tests/__mocks__/helpers.ts
  • tests/main.test.ts
✅ Files skipped from review due to trivial changes (3)
  • tests/mocks/helpers.ts
  • tests/main.test.ts
  • src/worker.ts

Comment thread package.json Resolved
@github-actions

github-actions Bot commented Apr 9, 2026

Copy link
Copy Markdown
Contributor

Unlisted dependencies (1)

Filename unlisted
jest.config.ts @octokit/webhooks-methods

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 2

🧹 Nitpick comments (1)
package.json (1)

10-10: Add upper bound to Node engine constraint.

Line 10 uses >=24.11.0, which allows future major versions. Add an upper bound (e.g., >=24.11.0 <25) to follow semver best practices and prevent unintended version drift.

Suggested patch
-    "node": ">=24.11.0"
+    "node": ">=24.11.0 <25"

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: c4f04ed9-c5a6-443a-a8df-0f6cc14fa4eb

📥 Commits

Reviewing files that changed from the base of the PR and between 0284f83 and 9008829.

⛔ Files ignored due to path filters (1)
  • bun.lock is excluded by !**/*.lock
📒 Files selected for processing (2)
  • .github/knip.ts
  • package.json
✅ Files skipped from review due to trivial changes (1)
  • .github/knip.ts

Comment thread package.json Resolved
Comment thread package.json Resolved
@gentlementlegen
gentlementlegen merged commit c5f607b into development Apr 10, 2026
8 checks passed
@gentlementlegen
gentlementlegen deleted the issue-17-deno-deploy-workflow branch April 10, 2026 06:22
@ubiquity-os-beta

ubiquity-os-beta Bot commented Apr 10, 2026 •

Copy link
Copy Markdown
Contributor

 [ 8.28 UUSD ] 

@gentlementlegen
Contributions Overview
ViewContributionCountReward
ReviewSpecification18.28
Conversation Incentives
CommentFormattingRelevancePriorityReward
## Summary- switch the deploy workflow to the new provision / …
4.14
content:
  content:
    h2:
      score: 1
      elementCount: 2
    ul:
      score: 0
      elementCount: 1
    li:
      score: 0.1
      elementCount: 3
    p:
      score: 0
      elementCount: 2
  result: 2.3
regex:
  wordCount: 71
  wordValue: 0.1
  result: 1.84
authorship: 1
Relevance: 1
Readability: 0.0
18.28

This branch was previously deployed

1 inactive deployment
development — 2f5bc56b Deployed Apr 9, 2026 by gentlementlegen via Publish Action Artifact #157
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.

Upgrade to newest Deno Deploy

1 participant