Urgent.News

What's breaking now, across thousands of outlets.

Tech

Automatically Deploy Your App to a VPS with GitHub Actions

If your deploy process is "SSH into the server, cd to the app, git pull , restart something, hope" — this post replaces it with git push . What you'll have by the end: every push to your main branch updates the app on your server automatically. You can also trigger a deploy by hand from the GitHub UI. This is the simple version — it has a few seconds of downtime during the restart and it builds…

GitHub Actions automates the process of deploying your application to a Virtual Private Server (VPS) with a simple GitHub push. This eliminates the need for manual SSH connections, command executions, and restarts. To set this up, you'll need an app in a GitHub repository, a VPS you can SSH into, a dedicated Linux user for deploys, and a few prerequisites.

First, generate an SSH key exclusively for deployment on your local machine. Add the public key to your server and test the connection. Then, grant the deploy user permission to restart your application without requiring a password. Store the SSH private key as a secret in your GitHub repository.

Create a GitHub Actions workflow file, `.github/workflows/deploy.yml`, that runs automatically on every push to the main branch. The workflow uses the `appleboy/ssh-action` to connect to your VPS, fetches the latest code from the main branch, resets to that commit, installs dependencies, builds the application, applies migrations, and finally restarts the app.

Common issues include permission errors, SSH username problems, missing dependencies, and memory constraints during build. Ensure your server setup matches the workflow's assumptions and adjust accordingly.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Measuring Order Book vs AMM Share on the XRP Ledger

When the AMM amendment activated on the XRP Ledger in 2024, the expectation was that liquidity would migrate into pools the way it did on every smart-contract chain before it.

  • 88.2% of trade activity occurs on the XRP Ledger's order book.
  • AMM volume has larger number of trades but smaller average trade size.
  • Order book's central limit order book remains viable due to low canceling costs.

Review Website Tencent EdgeOne

Berdasarkan tampilan pada gambar, Tencent EdgeOne merupakan platform yang menyediakan layanan untuk mempercepat sekaligus meningkatkan keamanan sebuah website.

More from Friday 11 September →