⚙️ Process

Deployment

Setting up Git-based deployment

WordPress → FlyWheel via Github Actions

There are some prerequisites for setting up deployment.

  • You've got an SSH key set up on your computer, which has been added to both Github and Flywheel. You only need to do this once for your computer.
  • You've set up the site on Flywheel already, and completed an initial push using Local Sync.

Assuming the above prerequisites are met, setting up deployment is easy!

  • Grab the Flywheel SSH user for your site.
    • On the Flywheel Dashboard, locate the relevant site.
    • Click the 'Advanced' tab.
    • Copy the user component from the 'Connect via SSH' section. (For example, if the connection string is ssh team+ed-digital+the-yards@ssh.getflywheel.com), the value you want is team+ed-digital+the-yards.
  • Grab your private key.
    • Assuming you're using your default private key, and that it's in the correct format already, you can just run cat ~/.ssh/id_rsa | pbcopy in your terminal to copy this directly to your clipboard.
  • Paste the secrets into the Github repo's 'Secrets' panel.
    • Open the repo on Github, and click Settings -> Secrets.
    • Add a new secret called SSH_USER and paste in the value from step 1. Save it!
    • Add a new secret called PRIVATE_KEY and paste in the value from step 2. Save it!
  • Finally, rename .github/workflows/main.yaml.disabled to .github/workflows/main.yaml and commit/push the results.
    mv .github/workflows/main.yaml.disabled .github/workflows/main.yaml
    git commit -am "Enable Github Action deployment"
    git push
    
  • Monitor the 'Actions' tab on your Github repo page to ensure that the first deployment succeeded.
⚠️

Your first deploy might fail to run at the 'Install Dependencies' step. Try running 'Re-run all jobs'.

Serverless via Vercel

TBW