GitHub Action to deploy a website to a Interweb Angola VPS over SSH https://docs.interweb.ao
  • Python 66.2%
  • Shell 33.8%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-11-28 11:03:57 +02:00
.github Add CI workflow and Dependabot 2026-11-28 09:16:56 +02:00
__pycache__ Show the English README by default 2026-11-28 11:03:57 +02:00
action.yml Initial release (1.0.0) 2026-11-27 22:29:25 +02:00
CHANGELOG.md Initial release (1.0.0) 2026-11-27 22:29:25 +02:00
deploy.sh Initial release (1.0.0) 2026-11-27 22:29:25 +02:00
LICENSE Initial release (1.0.0) 2026-11-27 22:29:25 +02:00
README.md Show the English README by default 2026-11-28 11:03:57 +02:00
README_pt.md Show the English README by default 2026-11-28 11:03:57 +02:00
repo.json Use badges from the brand git 2026-11-28 11:00:38 +02:00
vps.py Initial release (1.0.0) 2026-11-27 22:29:25 +02:00

Deploy on Interweb Angola VPS

Release License: MIT

A GitHub Action that publishes your site on your Interweb Angola VPS. It asks the Interweb Angola API which server to use and what its IP is, checks that it is running, and copies the files with rsync over SSH.

Português

Before you start

  1. API key. Create one in the API Center of Meu Interweb with the vps:read permission (add vps:write if you want the action to start a stopped server). Save it in your repository as the secret INTERWEB_API_KEY.
  2. SSH key. Make a key pair just for deploys (ssh-keygen -t ed25519 -f deploy_key -N ""), add deploy_key.pub to ~/.ssh/authorized_keys of the user on the VPS, and save the private key as the secret VPS_SSH_KEY.
  3. Host key (recommended). Run ssh-keyscan -p 22 YOUR_VPS_IP and save the output as the secret VPS_KNOWN_HOSTS. Without it, the action trusts the key the server shows at deploy time.

Example

.github/workflows/deploy.yml:

name: Deploy

on:
  push:
    branches: [main]

jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      # Build your site here if needed, for example: npm ci && npm run build

      - uses: interweb-ao/deploy-on-vps@v1
        with:
          api-key: ${{ secrets.INTERWEB_API_KEY }}
          ssh-private-key: ${{ secrets.VPS_SSH_KEY }}
          known-hosts: ${{ secrets.VPS_KNOWN_HOSTS }}
          source: ./public
          target: /var/www/html
          delete: true
          exclude: |
            .env
            uploads/
          post-command: systemctl reload nginx

With a single active VPS on the account there is nothing else to say. With several, choose one with server-id (the id of its service) or server-name (its hostname or IP).

Inputs

Input Default What it does
api-key API key with vps:read. Empty uses the INTERWEB_API_KEY environment variable.
server-id / server-name Which VPS. Empty uses the only active VPS of the account.
ssh-private-key Private SSH key (required).
ssh-user root SSH user.
ssh-port 22 SSH port.
known-hosts Host key of the VPS, from ssh-keyscan.
host Connect to this address instead of the main IP, such as an additional IP.
source . Folder of the repository to publish.
target Folder on the VPS (required), such as /var/www/html.
delete false Delete files on the VPS that are not in source.
exclude Paths to leave out, one per line. .git/ and .github/ never go.
rsync-options Extra rsync options, such as --chmod=D755,F644.
pre-command / post-command Commands run on the VPS, inside target, before and after the copy.
start-if-stopped false Start the VPS through the API if it is stopped (needs vps:write).
wait-timeout 600 Seconds to wait for the VPS to be running.
dry-run false Show what would be copied, without copying.

Outputs: server-id, server-name, ip and power-state.

Good to know

  • Runs on Linux and macOS runners (they have rsync, ssh and Python 3). Nothing is downloaded.
  • A suspended VPS stops the deploy with a clear message. A VPS that is starting or restarting is waited for.
  • With a sandbox_ key the API calls are simulated: starting a stopped server does nothing. The copy itself is real, because it goes over SSH.
  • If your key only accepts some IP addresses, remember that GitHub runners change IP. Use a self-hosted runner or leave the IP list empty for this key.
  • The API docs for servers: https://docs.interweb.ao/servers/

License

MIT. See LICENSE.


Maintained by RLX Holdings.