Chef14 Load a provider in a recipe Chef::Provider::DeployKeyGithub
This compatibility issue was solved for chef14 with the new load format of a provider in a recipe.

deploy_key deploy_key_name do
      provider Chef::ProviderResolver.new(node, find_resource!("deploy_key[github]"), :nothing).resolve
      path "/home/#{current_user}/.ssh"
      credentials({
          :token =&gt; File.read('/root/someid').strip
      })
      repo 'test/test_config'
      owner 'root'
      group 'root'
      mode '0400'
      action :add
  end