GitHub Actions for deployment of (WP) site to server via Git
How to
- Copy the workflow from this repo
- Add the requisite secrets as listed below
- Add the deploy key from the server (public key)
ssh-rsa 0000...
- 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/actionsSecret
Description
Example value
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