This GitHub action runs remote commands over SSH to update a Drupal 8+ instance. When a deployment is made, a Drupal instance needs to run specific commands:
- Database updates
- Config import
- Cache rebuild
- Translation updates
- etc.
path
- (Default:empty
) - Full absolute path on the remote server where the Drupal instance is locatedserver_name
- (Default:server
) - Is the name of the server given in the SSH configuration (.ssh/config
)drush
- (Default:./vendor/bin/drush
) - Name of Drush executable to use for deployments instead of default one from vendorenable_extra_modules
- (Default: empty) - After the deployment is done, some extra modules can be enabled (i.e.field_ui views_ui devel devel_generate
etc.)
Here's an example how to configure a remote SSH server myserver
given in the example below:
- name: "Configure SSH"
run: |
mkdir -p ~/.ssh/
echo "$SSH_KEY" > ~/.ssh/server.key
chmod 600 ~/.ssh/server.key
cat >>~/.ssh/config <<END
Host myserver
HostName $SSH_HOST
User $SSH_USER
IdentityFile ~/.ssh/server.key
StrictHostKeyChecking no
END
on:
workflow_dispatch:
name: Tests and code
jobs:
update:
runs-on: ubuntu-latest
steps:
- name: "Update instance"
id: release
uses: eaudeweb/drupal-update-action@1.x
with:
path: ${{ secrets.PROJECT_DIR }}/live
server_name: myserver
enable_extra_modules: field_ui views_ui devel devel_generate views_ui webform_ui purge_ui config