← Tous les articles

Deploying your site automatically with GitHub Actions

No more manual FTP uploads: automated deployment updates your site in one click, without mistakes.

Deploying your site automatically with GitHub Actions

Key takeaways

  • Automated deployment removes manual upload errors.
  • Every release is tracked and reversible.
  • It connects with an SSH key, no shared password.

Uploading files by hand over FTP is slow and error-prone: a forgotten file, the wrong version overwritten… Automation solves these problems.

How it works

The site’s code is versioned on GitHub. A GitHub Actions workflow connects to the server over SSH and syncs only the changed files. Every release is tracked and repeatable.

The benefits

  • One-click deployment, or automatic on every code update.
  • A full history: you know who changed what, and when.
  • Easy rollback to a previous version.
  • No shared passwords: the connection uses an SSH key stored in GitHub secrets.

Good practices

Never commit sensitive files like wp-config.php, exclude the media folder, and test the server connection in a dedicated step so problems are quick to diagnose.

A real example

For this site, the theme is versioned on GitHub. A workflow connects to the PlanetHoster server over SSH, checks the connection and the WordPress folder, then syncs changed files with rsync.

A theme update goes live in under a minute, and if anything goes wrong, we simply redeploy the previous version.

Frequently asked questions

Do I need to code to use it?

For the setup, yes. After that, a deployment is one click in GitHub.

Will my media files be overwritten?

No, the media folder is excluded from the sync.

What if my host has no SSH?

Deployment over secure FTP (FTPS) works on the same principle.

This is exactly how we deploy this very site.

Partager LinkedIn Facebook X WhatsApp
</>

webtestudio

Agence web : sites WordPress sur mesure, thèmes premium et logiciels SaaS.

Parler de votre projet →