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
2022-03-27T12:35:46.623+00:00

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:

/private_files
/other_stuff
/web

/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.
8,057 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Edward Johnson 21 Reputation points
    2022-03-28T06:00:08.28+00:00

    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.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.