No Signup. Unlimited Forms. Any File Upload. Just 5 Clicks to Launch Your First Form with Forms.crunchtrove.com
June 28, 2025Does Mid-Training Help Language Models to Reason Better?
September 5, 20251So I use this dirt-cheap but incredibly reliable server that costs me around $13 a year. Yup, per year, and I’m not even kidding.
Now, obviously, I’m not running a supercomputer here. The RAM and storage are tiny. But it works perfectly for my needs, especially when I combine it with a few smart tricks like Docker containers and GitHub Actions.
Here’s exactly how I set things up, from syncing code from my server to GitHub using SSH, to pushing from my laptop with GitHub Actions handling deployments.
My Typical Setup Flow (On the Server)
Most of the projects I run on that server live inside Docker containers. It makes my life easier: I SSH in, spin up a container, point my DNS to it, and I’m good to go.
But since I’ve got such limited space on that server, I figured, hey, why not use GitHub Actions to tear down old containers and redeploy new ones automatically?
Now I can push straight from VS Code, and GitHub handles all the building and deploying magic for me. No need to manually SSH in every time. Here’s how I got that flow working.
Setting Up Git to Push From My Server to GitHub
Step 1: Add a
.gitignore
File
First, I created a .gitignore file so Git wouldn’t track unnecessary stuff:
nano .gitignore
Inside, I added:
node_modules/
dist/
.env
*.log
.DS_Store
*.local
.vscode/
Then saved the file with:
Ctrl + O # save
Enter
Ctrl + X # exit
Step 2: Initialize the Git Repo
git init
git add .
git commit -m “First server commit”
This sets up the local Git repo and stages all files (except the ones we ignored).
Step 3: Set Up SSH Access to GitHub
At first, I tried to use HTTPS with a personal access token, but honestly? SSH is way more convenient and secure, especially from a headless server.
Here’s how I switched to SSH:
ssh-keygen -t ed25519 -C "[email protected]"
Just keep pressing Enter when it asks you stuff — default values work fine.
Then copy your public key:
cat ~/.ssh/id_ed25519.pub
Head to GitHub → Settings → SSH and GPG keys → “New SSH Key” → Paste it in and save.
Now, set your remote to use SSH:
git remote add origin [email protected]:your-username/your-repo.git
Or update it if you already had one:
git remote set-url origin [email protected]:your-username/your-repo.git
Test the connection:
ssh -T [email protected]
You should see something like:
Hi your-username! You’ve successfully authenticated.
Step 4: Pull Remote Files (If Needed)
Sometimes your repo on GitHub might already have a README.md or LICENSE. That can cause conflicts with your local files.
This fixes it:
git pull origin main --allow-unrelated-histories --no-rebase
If a text editor pops up, just:
- Ctrl + O to save
- Ctrl + X to exit
Step 5: Final Commit and Push
git add .
git commit -m “Merged remote LICENSE with project”
git push origin main
And that’s it! Your server’s project is now live on GitHub.
Working From My Laptop With GitHub Actions
After setting up the server, I wanted to be able to push code from my laptop and have everything redeploy without touching SSH.
Here’s what I did:
Step 1: Clone the Private Repo With SSH
On your laptop (assuming you added your Mac’s SSH key to GitHub):
git clone [email protected]:your-username/your-repo.git
Step 2: Initialize Git (for a new local project)
If you’re starting fresh:
git init
nano .gitignore # add ignored files
git add .
git commit -m “Initial commit”
git remote add origin [email protected]:your-username/your-repo.git
git push origin main –force
Force push is sometimes needed if histories conflict.
Step 3: Push Updates
Now, anytime you make a change:
git add .
git commit -m “Your message here”
git push origin main
Auto-Deploy With GitHub Actions
This part is optional but so powerful: I set up a GitHub Actions workflow to redeploy my Docker container when I push to main.
It looks something like this in .github/workflows/deploy.yml:
name: Deploy to Server
on:
push:
branches:
– main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Deploy over SSH
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.SERVER_IP }}
username: ${{ secrets.SERVER_USER }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
script: |
docker stop your_container || true
docker rm your_container || true
docker pull your_image
docker run -d --name your_container -p 80:80 your_image
That way, all I do is:
git push origin main
And a few seconds later, my server is running the updated app — no SSH login needed.
If you’re running side projects on a tiny budget, this setup is honestly gold. Git + SSH + GitHub Actions + Docker = smooth developer experience even on minimal infrastructure.
