I really need help I've been on this problem for a week, and have gone over all my steps, and even recreated the situation with a new server. I am trying to use GitHub Action for WP Engine Site Deployments. I have set up an Organization level self-hosted runner on digital ocean. The runner is operational and connects to GitHub. I have created an ssh key pair and added the private key to github. First, I tried adding it to the environment for this project, and then I tried adding to the repo (same results). The public key has been added to my user profile on WPEngine. I used this guide to set this up: https://wpengine.com/support/github-action-deploy/#Setup_Instructions
I verified that the key pair works, I can ssh from my desktop to the wpengine server with this key pair. The problem is, whenever I try to use this GitHub action, I get the same error every time:
/entrypoint.sh: line 7: WPE_SSHG_KEY_PRIVATE: WPE_SSHG_KEY_PRIVATE variable missing from Repo or Workspace variables.
In my project, I've gone to settings and set the secrets under both environments and the repos codespace section.
Here is the yml I'm using:
name: Deploy to WP Engine Development env
on:
push:
jobs:
build:
runs-on: self-hosted
steps:
- uses: actions/checkout@v2
- name: GitHub Action Deploy to WP Engine DeveLopment env
uses: wpengine/github-action-wpe-site-deploy@v3
with:
WPE_SSHG_KEY_PRIVATE: ${{ secrets.WPE_SSHG_KEY_PRIVATE }}
WPE_ENV: mydevserver
My GitHub account has full permissions, so I can't see that being the issue. I know that the files are making it on to the digital ocean server. So when I push from my desktop to the dev repo these actions should run. They fail but. It does look like a few steps work prior to failure. Here is a copy of the step in the build process that fails on github:
Run wpengine/github-action-wpe-site-deploy@v3
with:
WPE_ENV: mydevserver
PHP_LINT: false
FLAGS: -azvr --inplace --exclude=".*"
CACHE_CLEAR: true
SRC_PATH: .
/usr/bin/docker run --name wpenginesitedeploy100_7f9f63 --label 5c056d --workdir /github/workspace --rm -e "INPUT_WPE_SSHG_KEY_PRIVATE" -e "INPUT_WPE_ENV" -e "INPUT_PHP_LINT" -e "INPUT_FLAGS" -e "INPUT_CACHE_CLEAR" -e "INPUT_SRC_PATH" -e "INPUT_REMOTE_PATH" -e "INPUT_PRD_ENV" -e "INPUT_STG_ENV" -e "INPUT_DEV_ENV" -e "INPUT_SCRIPT" -e "WPE_SSHG_KEY_PRIVATE" -e "WPE_ENV" -e "PRD_ENV" -e "STG_ENV" -e "DEV_ENV" -e "REMOTE_PATH" -e "SRC_PATH" -e "FLAGS" -e "PHP_LINT" -e "CACHE_CLEAR" -e "SCRIPT" -e "HOME" -e "GITHUB_JOB" -e "GITHUB_REF" -e "GITHUB_SHA" -e "GITHUB_REPOSITORY" -e "GITHUB_REPOSITORY_OWNER" -e "GITHUB_REPOSITORY_OWNER_ID" -e "GITHUB_RUN_ID" -e "GITHUB_RUN_NUMBER" -e "GITHUB_RETENTION_DAYS" -e "GITHUB_RUN_ATTEMPT" -e "GITHUB_REPOSITORY_ID" -e "GITHUB_ACTOR_ID" -e "GITHUB_ACTOR" -e "GITHUB_TRIGGERING_ACTOR" -e "GITHUB_WORKFLOW" -e "GITHUB_HEAD_REF" -e "GITHUB_BASE_REF" -e "GITHUB_EVENT_NAME" -e "GITHUB_SERVER_URL" -e "GITHUB_API_URL" -e "GITHUB_GRAPHQL_URL" -e "GITHUB_REF_NAME" -e "GITHUB_REF_PROTECTED" -e "GITHUB_REF_TYPE" -e "GITHUB_WORKFLOW_REF" -e "GITHUB_WORKFLOW_SHA" -e "GITHUB_WORKSPACE" -e "GITHUB_ACTION" -e "GITHUB_EVENT_PATH" -e "GITHUB_ACTION_REPOSITORY" -e "GITHUB_ACTION_REF" -e "GITHUB_PATH" -e "GITHUB_ENV" -e "GITHUB_STEP_SUMMARY" -e "GITHUB_STATE" -e "GITHUB_OUTPUT" -e "RUNNER_OS" -e "RUNNER_ARCH" -e "RUNNER_NAME" -e "RUNNER_TOOL_CACHE" -e "RUNNER_TEMP" -e "RUNNER_WORKSPACE" -e "ACTIONS_RUNTIME_URL" -e "ACTIONS_RUNTIME_TOKEN" -e "ACTIONS_CACHE_URL" -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/ops/actions-runner/_work/_temp/_github_home":"/github/home" -v "/home/ops/actions-runner/_work/_temp/_github_workflow":"/github/workflow" -v "/home/ops/actions-runner/_work/_temp/_runner_file_commands":"/github/file_commands" -v "/home/ops/actions-runner/_work/myproj/my-proj":"/github/workspace" wpengine/site-deploy:1.0.0
/entrypoint.sh: line 7: WPE_SSHG_KEY_PRIVATE: WPE_SSHG_KEY_PRIVATE variable missing from Repo or Workspace variables.
WPE_SSHG_KEY_PRIVATE is the name of the secret that I set. There is only so many steps I can redo. I've replaced the keys a few times, I've tried different variations on the yaml. I'm just lost and stressed out.
I've created new key sets and added them into their respected spots (GitHub: Environment and repo secrets for the private key) and WPEngine user profile for the public key. I've verified the key set works by logging in to wpengines server from my cli. I've tried alternate names for the variable when naming it in Github.
What I expect to happen is I push a file to development from my desktop, then through the github action and self-hosted runner, the updated code is then deployed to the dev site on WPEngine.
What actually happens is the deployment fails because the private key cannot be found even though it has been set and verified (see earlier).