How to Deploy from Your iPhone: GitHub Actions, Deploy Hooks and Shortcuts
Disclosure: I build Pocket Actions, one of the options below, and I list where it's the wrong choice. Platform details are from official docs (linked) as of the last-checked date; anything I couldn't verify is marked unconfirmed.
The situation
The code is already merged. You just need a deploy — and your laptop is at home. Typical cases: a hotfix PR got merged while you're out, a scheduled post should go live now, or CMS content changed and the static site needs a rebuild. You're not coding on the phone; you're triggering a pipeline you already trust.
What to compare
- Taps to start a deploy
- What lives on the phone (token or URL) and what happens if it leaks
- Branch control
- Seeing the result
- Setup effort
Option 1: GitHub Mobile + workflow_dispatch
If you deploy with GitHub Actions, add on: workflow_dispatch and you can run it from GitHub Mobile (changelog). The workflow file must be on the default branch (docs).
- Pros: free, no PAT (you sign in), branch picker, live logs.
- Cons: several screens deep every time.
Option 2: Vercel or Cloudflare Pages deploy hooks
A deploy hook is a URL that starts a build when called.
Vercel (docs): created per project for a chosen branch; a GET or POST triggers a build with no authentication, so treat the URL as a secret. Hobby and Pro allow 5 hooks per project, and triggers are limited to 60 per hour per project.
Cloudflare Pages (docs): each hook builds one configured branch; trigger it with a POST to the unique URL, no auth required.
From the phone: because Vercel accepts GET, opening the URL in Safari works (but bookmarks and history are an easy way to leak it). For Cloudflare's POST, use the Shortcuts "Get Contents of URL" action with method POST.
- Pros: the simplest option; no GitHub token.
- Cons: anyone with the URL can deploy; tests must be part of the host's build; results live in the host dashboard.
Option 3: iOS Shortcuts + GitHub API
A Shortcut can call POST /repos/{owner}/{repo}/actions/workflows/{id}/dispatches with a ref and inputs. One tap from the Home Screen, a widget, or Siri. You'll build the URL, headers and JSON yourself, and the PAT sits inside the shortcut. See the Shortcuts guide and use a fine-grained token limited to the repo with Actions: write.
Option 4: Pocket Actions
Runs workflow_dispatch workflows in 1–3 taps and turns inputs (e.g. a choice of environment) into a form. No server, no login, token kept only on the device.
Honest limits:
- Always runs on
main— not for deploying staging or feature branches. - No logs in the app — check GitHub or your host's notifications.
- iOS only (Android is in closed testing).
- Not no-code — you write the workflow.
- Free: 5 runs/day, 17/week. Premium $2.99/mo or $49.99 lifetime.
Comparison
Scroll sideways to see the whole table
| Method | Taps | Stored on phone | Branch | Result visibility | Cost |
|---|---|---|---|---|---|
| GitHub Mobile | Several screens | Nothing (signed in) | Choose | Full logs | Free |
| Vercel deploy hook | Open a URL | Hook URL | Fixed per hook | Vercel dashboard | Your Vercel plan |
| Cloudflare Pages hook | Shortcut POST | Hook URL | Fixed per hook | Cloudflare dashboard | Your Cloudflare plan |
| Shortcuts + API | 1 after setup | PAT | Choose via ref | DIY | Free |
| Pocket Actions | 1–3 | PAT (on device) | main only | Check GitHub | Free tier / paid |
GitHub Actions minutes: free for standard runners in public repos; private repos use your plan's included amount, then billing (docs).
Safety rails for deploying from a phone
- Require approval for production: GitHub environments with required reviewers stop an accidental tap from shipping immediately.
- Put tests in the deploy workflow — you can't eyeball things on a laptop first.
- Scope secrets narrowly: one hook per branch, one token per repo; rotate on any doubt.
- Send notifications (Slack, email) on success/failure so the phone tells you the outcome.
Setting each one up, step by step
The comparison above is only useful if you can actually build the thing. Here is the minimal working setup for each option, plus the errors people hit most often.
A deploy workflow that every phone option can start
Options 1, 3 and 4 all start the same kind of file: a GitHub Actions workflow with a workflow_dispatch trigger. This is a minimal example for a static site; swap the build and deploy steps for your own.
# .github/workflows/deploy.yml
name: Deploy
on:
workflow_dispatch:
inputs:
target:
description: "Where to deploy"
type: choice
options: [production, preview]
default: preview
dry_run:
description: "Build only, skip upload"
type: boolean
default: false
concurrency:
group: deploy-${{ inputs.target }}
cancel-in-progress: false
jobs:
deploy:
runs-on: ubuntu-latest
environment: ${{ inputs.target }}
steps:
- uses: actions/checkout@v4
- run: npm ci
- run: npm test
- run: npm run build
- if: ${{ !inputs.dry_run }}
run: ./scripts/deploy.sh "${{ inputs.target }}"
env:
DEPLOY_TOKEN: ${{ secrets.DEPLOY_TOKEN }}
What each part buys you when you're on a phone:
inputswithtype: choiceandboolean— GitHub supportsboolean,choice,number,environmentandstringinput types (workflow syntax). A choice list means you pick from a menu instead of typing "production" on a small keyboard.concurrency— if you tap twice by accident, the second run waits for the first instead of racing it (concurrency docs).environment— combined with required reviewers in repository settings, a production run pauses until someone approves it (environments docs). On a phone, that approval step is your undo button.npm testbefore deploy — you can't check things on a laptop first, so the workflow has to.- Secrets stay in GitHub — the phone never holds your hosting credentials; it only holds something that can start the workflow.
Commit the file to the default branch. GitHub only shows the "Run workflow" button for workflow_dispatch workflows whose file is on the default branch.
Option 1 setup: GitHub Mobile
- Push the workflow above to the default branch.
- In GitHub Mobile, open the repository → Actions → choose Deploy.
- Tap Run workflow, pick the branch and inputs, and confirm.
- Stay on the run screen to watch the logs.
Nothing to store, nothing to rotate. The cost is navigation: you go through the repository and workflow list each time.
Option 2 setup: deploy hooks
Vercel: Project → Settings → Git → Deploy Hooks. Name the hook, choose the branch, and copy the URL (Vercel docs). Cloudflare Pages: Project → Settings → Builds → Deploy hooks, then name it and choose the branch (Cloudflare docs).
Test from a terminal first so you know the hook works before you rely on it from the phone:
curl -X POST "https://api.vercel.com/v1/integrations/deploy/<your-hook-path>"
curl -X POST "https://api.cloudflare.com/client/v4/pages/webhooks/deploy_hooks/<your-hook-id>"
(The angle-bracket parts are placeholders. Copy the real URL from your dashboard and don't paste it into chats or issues.)
Then on the iPhone, build a Shortcut:
- Text action → paste the hook URL.
- Get Contents of URL → URL = the Text; tap the disclosure arrow, set Method to POST.
- Show Notification → "Deploy hook called".
- Name it "Rebuild site" and add it to the Home Screen.
Option 3 setup: a Shortcut that calls the GitHub API
The endpoint is POST /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches (REST docs). workflow_id can be the file name, such as deploy.yml. Here's the same call as curl, which is the easiest way to debug before you rebuild it in Shortcuts:
curl -X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer $GITHUB_TOKEN" \
https://api.github.com/repos/OWNER/REPO/actions/workflows/deploy.yml/dispatches \
-d '{"ref":"main","inputs":{"target":"preview","dry_run":"false"}}'
Per GitHub's current REST docs, a successful workflow dispatch returns 200 with workflow_run_id, run_url and html_url (docs). Whether older API versions still return an empty 204 is unconfirmed, so treat any 2xx as success.
The Shortcut, action by action:
- Choose from Menu with items "preview" and "production".
- Under each item, a Text action holding
{"ref":"main","inputs":{"target":"preview"}}(or production). - Get Contents of URL → the URL above, Method POST, Headers:
Accept: application/vnd.github+json,Authorization: Bearer <token>; Request Body: File → the Text from step 2. (Or use the JSON body option and addrefand aninputsdictionary.) - Show Notification → "Deploy requested".
Option 4 setup: Pocket Actions
- Create a classic PAT with the
reposcope, or try a fine-grained PAT with Actions read/write and Contents read. The fine-grained path is supported in code but hasn't been tested on a device yet. - Paste it into Pocket Actions. It's stored only on the device.
- Pick the repository and the Deploy workflow. The
targetchoice anddry_runtoggle appear as a form. - Tap to run. The run starts on
main, so it matches a workflow that deploysmain.
Errors you'll probably meet
Scroll sideways to see the whole table
| Symptom | Likely cause | Fix |
|---|---|---|
404 Not Found from the API | Token can't see the repo, or the owner/repo/file name is misspelled. GitHub answers 404 rather than 403 for private resources you can't access (troubleshooting) | Check the token's repository access and the exact file name |
422 "Workflow does not have 'workflow_dispatch' trigger" | The trigger isn't on the branch in ref | Merge the workflow to that branch |
422 about inputs | An input name isn't defined, or a required one is missing | Match names exactly to the YAML |
| No "Run workflow" button | Workflow file isn't on the default branch | Merge it to the default branch |
| Hook returns OK but nothing deploys | Hook points at a different branch, or the build failed | Check the host dashboard's deployment list |
| Run waits forever | Environment with required reviewers is waiting for approval | Approve it in GitHub (also possible in GitHub Mobile) |
(Exact error message wording isn't documented; treat the quoted text as typical, unconfirmed.)
Security notes specific to deploys
- A hook URL is a password with no username. Keep it out of Safari history (use Shortcuts, not bookmarks), and rotate it if a shortcut gets shared. Deleting the hook and creating a new one invalidates the old URL.
- A PAT is broader than a hook. A classic
repotoken can read and write every repository you can access. If that's too much, use a fine-grained token scoped to one repository, and set an expiry. - Don't share a Shortcut that embeds a token. Shared shortcuts carry their text actions with them.
- Let the workflow decide what's safe. Required reviewers, tests and
concurrencylive in the repository, so they apply no matter which phone option starts the run.
Rolling back from the phone
Deploying from a phone is only half the story. You also need a way back if the deploy goes wrong. Each option handles that differently:
- Vercel and Cloudflare Pages keep previous deployments. In the dashboard, which also works in a mobile browser, you can promote or roll back to an earlier deployment (Vercel instant rollback, Cloudflare Pages rollbacks). That's usually the fastest undo, and it doesn't need GitHub at all.
- GitHub Actions deploys can be rolled back by running the same workflow with an older version. Add a
versioninput (a tag or commit SHA) and check it out:
version:
description: "Tag or SHA to deploy (blank = latest main)"
type: string
required: false
# ...
- uses: actions/checkout@v4
with:
ref: ${{ inputs.version || github.sha }}
This also works around Pocket Actions' main-only limit: the run starts on main, but the workflow checks out whatever tag you type. Only the workflow definition comes from main.
- Revert and redeploy: reverting the bad commit in GitHub Mobile or the web and letting your normal pipeline run is slower, but it leaves a clean history.
Whatever you pick, try the rollback once on a quiet day. Discovering in an emergency that your rollback path needs a laptop isn't a good experience.
Which should you choose?
- Static site on Vercel/Cloudflare, just rebuild: deploy hook.
- Occasional deploys, want logs right there: GitHub Mobile.
- Need branch choice, want it free: Shortcuts + API.
- Frequent one-tap deploys or rebuilds of
main: Pocket Actions.
A real example
My own most-used Pocket Actions button isn't a deploy — it runs a workflow that asks AI to evaluate stocks I'm curious about, when I need it. A deploy works the same way: an existing workflow, started from the phone.
Try it
If you have a workflow that deploys main, try it free (5 runs a day).
View Pocket Actions on the App Store
FAQ
Can I deploy using only my iPhone? Yes, if a pipeline already exists. Start it from GitHub Mobile, a browser, a Shortcut, or a dedicated app.
Do Vercel deploy hooks need authentication? No. Treat the URL as a secret. Vercel accepts GET or POST to trigger a build.
Can Pocket Actions deploy a staging branch?
No. It always runs on main. Use GitHub Mobile or a Shortcut with ref for other branches.
How do I avoid deploying to production by accident? Use a GitHub environment with required reviewers so the job waits for approval.
Can I see the deploy result on my phone? GitHub Mobile shows logs. Pocket Actions doesn't; use GitHub or host notifications.
Related
- How to Trigger GitHub Actions from Your iPhone: 7 Options Compared
- workflow_dispatch vs repository_dispatch vs REST API vs gh CLI
- Fine-grained vs classic tokens for mobile apps
- Pocket Actions changelog
Last checked: 2026-11-01 (Vercel Deploy Hooks, Cloudflare Pages deploy hooks, GitHub Docs).
