How to deploy a Drupal app using GHA from a GitHub repo that includes files that should not be in webroot?

Edward Johnson 21 Reputation points

I just set up a webapp in Azure using App Service. However, I'm having trouble deploying with GitHub actions.

My GitHub repo's structure looks like this:


/web is the Drupal web root.

I want to serve files from /web, but I also want the directories /private_files and /other_stuff to be available on the server. (I will be using Drupal's command-line interface, drush, to work with those files.)

When I set up the webapp, App Service automatically created a basic GitHub action for doing the deploy, but looking at the action.yml for this action, there seems to be no way to send files somewhere other than the web root.

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,039 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Edward Johnson 21 Reputation points

    I found the answer: set the web root to be a subdirectory, and then deploy everything to the original web root. This way, you can use the azure GitHub action to deploy.

    However, I'm using PHP 8, as Drupal 9 requires it, and so the docs, which currently only describe Apache, don't apply because azure switched to nginx from PHP 8. Details on how to rewrite here.