reactjs – Utilizing iOS Shortcut to deploy a React GitHub Pages via a Native Server

0
22
reactjs – Utilizing iOS Shortcut to deploy a React GitHub Pages via a Native Server


I’ve two React web sites that I constructed. Often, I entry them on my laptop computer or desktop via VS Code, which has all my authorizations preconfigured.

However once I’m on the go, I generally code on my cellphone utilizing the GitHub Cell app. The issue arises as a result of my code can be on an area server that has a “post-commit” hook preconfigured. This, mixed with the truth that I am logged into VS Code on my PC and laptop computer, makes every little thing simpler. Nevertheless, once I commit and deploy from my cellphone, since VS Code.dev isn’t appropriate for coding on the cellphone (the iPad is a distinct story), there is not any “post-commit” hook operating on the GitHub Cell app on my cellphone.

My first answer was to make use of both Termius’s Snippet instrument or iOS Shortcuts to preconfigure every little thing. Then, I assigned it as a Triple Again Faucet Menu/Aspect Button shortcut to run the script.

I believed I might simply SSH into my server utilizing Tailscale, run the script utilizing iOS Shortcuts or Termius, and the web site could be up to date. However no, it would not work like that.

Script:

cd [Repo/Directory]
git pull
npm run deploy

The issue is that iOS Shortcuts would not hook into the server’s particular actions to immediate the consumer for enter (e.g., requesting Git username and password, which correspond to your GitHub username and private entry token). I am undecided if Termius has the flexibility to request these from the terminal.

My web site recordsdata are on a server operating the newest Ubuntu LTS: Noble Numbat 24.04.1.

Purpose:

Run the script and count on every little thing to undergo, with a standing replace showing on the GitHub Repo Motion web page.

Query:

How can I configure my setup in order that once I commit and deploy code from my cellphone, the script runs easily on the server with out guide prompts for Git authentication? Is there a approach to automate the Git pull and deployment course of when utilizing SSH from my cellphone, maybe by storing credentials securely or modifying the script to deal with authentication?

LEAVE A REPLY

Please enter your comment!
Please enter your name here