Closed MichelleBlanchette closed 2 years ago
completionist
plugin with composer install
scp
built code to GitHub SSH user's /home
directory on production
ssh
, stop here until build looks correctssh
into productionrsync --exclude="wp-content/uploads" --exclude="wp-content/ptc-resources-server/logs" --exclude="wp-content/ptc-resources-server/resources" /var/www/html/wp-content
(for illustration purposes, not actual command)
echo 'GitHub Actions Bot was here' > /var/www/html/deployment-test.txt
to confirm access and permissionschown -R www-data:www-data /var/www/html/wp-content
To start, let's use the manual dispatch event: https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows#manual-events
rsync
To avoid the chown
and chmod
commands needing to be ran... Could try using rsync --owner --group
as specified in the manual page: https://linux.die.net/man/1/rsync
I'm not quite sure how this works, but it sounds like you'd chown -R www-data:www-data
on the GitHub Actions machine, and then use the rsync
options to maintain the owner and group as the code is synced over to its destination.
I have confirmed a fully successful deployment. This is awesome. 😎
By the way, top disk usage is now this:
148500 /var/www/html
97576 /var/www/html/wp-content
77556 /var/www/html/wp-content/plugins
40936 /var/www/html/wp-includes
22632 /var/www/html/wp-includes/js
16784 /var/www/html/wp-content/plugins/wordpress-seo
15360 /var/www/html/wp-content/plugins/wordfence
13120 /var/www/html/wp-content/plugins/post-smtp
12912 /var/www/html/wp-content/plugins/wp-rocket
12804 /var/www/html/wp-content/uploads
Checking the disk usage...
... I can see that
git
is taking up the most space:Also, the submodule checkouts are often confusing because I hardly ever do them.
And it'd definitely be a good learning experience to use GitHub Actions and automate my deployments!!