https://github.com/s2009-dev/servup
Upload an artifact from Github Actions to a server using SSH
https://github.com/s2009-dev/servup
actions artifacts continuous-integration curl deployment english publishing s2009 shell ssh
Last synced: about 1 month ago
JSON representation
Upload an artifact from Github Actions to a server using SSH
- Host: GitHub
- URL: https://github.com/s2009-dev/servup
- Owner: S2009-dev
- License: gpl-3.0
- Created: 2025-10-05T15:40:45.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2025-10-05T19:10:55.000Z (8 months ago)
- Last Synced: 2025-10-05T19:11:32.332Z (8 months ago)
- Topics: actions, artifacts, continuous-integration, curl, deployment, english, publishing, s2009, shell, ssh
- Language: Shell
- Homepage:
- Size: 103 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# [](https://github.com/marketplace/actions/servup-deployment)





## :information_source: About
ServUP is a lightweight, open-source, and easy-to-use deployment tool designed to simplify the process of deploying artifact from GitHub Actions to remote servers. It provides a simple and efficient way to manage your deployments, ensuring that your applications are always up-to-date and running.
### :bookmark_tabs: Index
- [About](#information_source-about)
- [Index](#bookmark_tabs-index)
- [Features](#sparkles-features)
- [Installation](#gear-installation)
- [Server Configuration](#cloud-server-configuration)
- [Repository Configuration](#file_folder-repository-configuration)
- [Annexes](#wrench-annexes)
- [Iptables Support](#fire-iptables-support)
### :sparkles: Features
ServUP uses SSH to securely transfer files from your GitHub Actions workflow to your remote server.
## :gear: Installation
In order to work with ServUP, you need to do some configuration on your server and your GitHub repository.
### :cloud: Server Configuration
Install ServUP on your server via the command-line with curl:
```sh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/S2009-dev/ServUP/main/tools/install.sh)"
```
This will create a `servup` user on your server and open a specific port for SSH connections (`1424` by default).
Ensure that you've copied the ServUP SSH Key given at the end of installation.
If you have a firewall, make sure to open the port given at the end of installation.
You can trust only GitHub Actions IPs, they are listed in the `actions` section of the [GitHub meta API](https://api.github.com/meta).
We provide a script to help you configure your firewall if you are using `iptables`. See [Iptables Support](#fire-iptables-support) for more information.
### :file_folder: Repository Configuration
**1. Add the following secrets to your GitHub repository:**
- `SSH_HOST`: The IP address or domain name of your server.
- `SSH_PORT`: The port used by ServUP for SSH connections (default: `1424`).
- `SSH_PRIVATE_KEY`: The private key of the `servup` user on your server.
**2. Implement the ServUP Deployment workflow:**
Add the following step to your workflow:
```yml
- name: ServUP Deployment
uses: S2009-dev/ServUP@latest
with:
artifact:
run-id: ${{ github.run_id }}
remote: /var/lib/servup/
deploy-cmd:
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SSH_HOST: ${{ secrets.SSH_HOST }}
SSH_PORT: ${{ secrets.SSH_PORT }}
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
```
Or if you want to use the development version:
```yml
- name: ServUP Deployment
uses: S2009-dev/ServUP@latest
with:
artifact:
run-id: ${{ github.run_id }}
remote: /var/lib/servup/
deploy-cmd:
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SSH_HOST: ${{ secrets.SSH_HOST }}
SSH_PORT: ${{ secrets.SSH_PORT }}
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
```
Replace ``, `` and `` with your own values.
- `` is the name of the artifact generated by your workflow (ex: `my-artifact`).
- :warning: **Warning:** Ensure that your workflow generates an artifact containing a zip file.
- `` is the remote directory where the artifact will be uploaded (ex: `my-remote`).
- :warning: **Warning:** The remote directory must be accessible by the `servup` user.
- `` is the directory where the artifact will be deployed (ex: `my-deploy`).
- :warning: **Warning:** The deploy command must be a valid command that can be executed by the `servup` user.
- You can allow the `servup` user to execute the deploy command by creating and editing the `/etc/sudoers.d/servup` file.
## :wrench: Annexes
Here you will find additional tools and resources to help you use ServUP effectively.
### :fire: Iptables Support
If you are using `iptables` as your firewall, you can use the following command to open the ServUP SSH port:
```sh
servup-firewall
```
Or if it's not working:
```sh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/S2009-dev/ServUP/main/tools/firewall.sh)"
```