Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
freem
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Openai/693ba5ec-6904-8005-835d-720fc0b35241
(section)
Add languages
Page
Discussion
English
Read
Edit
Edit source
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
Edit source
View history
General
What links here
Related changes
Special pages
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Assistant: You can do this from your phone, but you’ll want a path that doesn’t require running npm locally. === You can do this from your phone, but you’ll want a path that doesn’t require running npm locally. ==== Best option from a phone: Vercel (no local build) ==== # Make sure your code is on GitHub (you can upload/edit files in the GitHub mobile app). # On your phone, open Vercel and sign in with GitHub. # Tap New Project → pick your repo. # Vercel usually auto-detects React. - If it asks: - CRA output: build - Vite output: dist - Build command: npm run build # Tap Deploy. That’s it. Every time you push to GitHub (even from the phone), it redeploys automatically. ==== If you insist on GitHub Pages from a phone (still doable) ==== GitHub Pages needs a built output somewhere. From a phone you typically can’t run npm run build, so you have two workable patterns: ===== Pattern A: GitHub Actions builds and publishes (recommended) ===== You push code from your phone, GitHub builds it in the cloud and publishes Pages. If you tell me whether your app is Vite or Create React App, I’ll paste a ready-to-use .github/workflows/deploy.yml you can add from the GitHub app and it’ll just work. ===== Pattern B: Use StackBlitz / CodeSandbox to import from GitHub and deploy ===== * Import repo in StackBlitz/CodeSandbox from your phone browser * They can build in the cloud and you can deploy (often easier than Pages) ==== Quick question (so I give you the exact one-file solution) ==== Is your React app Vite or Create React App? If you don’t know, paste the top of your package.json (the scripts section) and I’ll tell you and give you the exact GitHub Actions file.
Summary:
Please note that all contributions to freem are considered to be released under the Creative Commons Attribution-ShareAlike 4.0 (see
Freem:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)