Deploy Actions

Deploy Actions

GitHub Actions for deployment of (WP) site to server via Git

How to

  1. Copy the workflow from this repo
  1. Add the requisite secrets as listed below
  1. Add the deploy key from the server (public key) ssh-rsa 0000...
  1. Check workflow details are correct i.e. branch names match your repo

Environment Variables / Secrets

To run this project, you will need to add the following environment variables to your repo Actions Secrets. https://github.com/YOUR_REPO/settings/secrets/actions
Secret
Description
Example value
HOST
ds2.barqueshosting.co.uk
USERNAME
my_website
KEY
-----BEGIN RSA PRIVATE KEY----- ...

SSH Keys

GitHub no longer supports RSA SSH keys so the keys on the server need updating to use the ECDSA standard. Read more here.
Use new type of key as general SSH Key, use old type (ssh-keygen) for automations

Generate ECDSA SSH key

ssh-keygen -t ecdsa -b 256