This repository turns a GitHub Actions workflow into an interactive SSH server (a mini-VPS) with persistent state across runs using a dedicated Git branch: filesystem.
- Click Use this template and create a new private repo. This should trigger the workflow and start a tmate session (if not, trigger it manually from the Actions tab).
- Once the job starts, open the latest run and follow the tmate session links (the README will be updated automatically).
⚠️ Recommended: keep the repo private, since this exposes an interactive shell on a GitHub runner.
GitHub Actions normally runs disposable jobs. Here we combine:
- tmate for an interactive shell (SSH + web terminal)
- a Git branch (
filesystem) to persist filesystem state across runs - a GitHub Actions workflow that restores state, starts remote access, and records changes
➡️ The result: a reusable remote environment that can resume from a previous session like a VPS.
- The workflow starts (via manual dispatch or scheduled trigger).
start-tmate.shrestores state from thefilesystembranch (if it exists), or creates an empty branch.- The script starts
tmate, prints SSH/web links, and updatesREADME.md. - During the session, all modifications are automatically committed/pushed to the
filesystembranch.
The filesystem branch holds the current session state: files, installs, configs, etc.
- It is pushed on every automatic save.
- The workflow always starts from its latest state.
- You can reset / inspect it using Git (
git checkout filesystem,git log, etc.).
You can force the filesystem branch from another ref (e.g. main):
# Reset filesystem from main and push
git checkout main
git checkout -B filesystem
git push -f origin filesystem./.github/workflows/ssh.yml: main workflow that starts the tmate session./.github/scripts/start-tmate.sh: restoresfilesystem, startstmate, and handles saving./.github/scripts/update_readme.py: updates this README with live session links
This setup exposes a remote shell on a GitHub runner (private depending on the repo). Don’t share it publicly, and stop the workflow when you’re done.
This repo turns a GitHub Actions workflow into a mini-VPS:
- live SSH / web shell via
tmate - persistent state via the
filesystembranch - easy restore: the session always resumes where it left off
Ready to use for exploring, developing, or debugging in a temporary Linux environment that can be restored at any time.