Run the commands as the HTTP_USER

This commit is contained in:
Jonny Barnes 2021-12-30 11:02:48 +00:00
parent e0fd8948cd
commit 9fbfc466c0

View file

@ -95,7 +95,7 @@ jobs:
key: ${{ secrets.DEPLOYMENT_KEY }} key: ${{ secrets.DEPLOYMENT_KEY }}
script: | script: |
cd ${{ env.newReleaseDir }}; cd ${{ env.newReleaseDir }};
php artisan clear-compiled; sudo runuser -u ${{ secrets.HTTP_USER }} -- php artisan clear-compiled;
- name: 🙈 Migrate database - name: 🙈 Migrate database
uses: appleboy/ssh-action@master uses: appleboy/ssh-action@master
@ -119,10 +119,10 @@ jobs:
ln -nfs ${{ env.newReleaseDir }} ${{ env.currentDir }}; ln -nfs ${{ env.newReleaseDir }} ${{ env.currentDir }};
cd ${{ env.newReleaseDir }} cd ${{ env.newReleaseDir }}
#php artisan horizon:terminate #php artisan horizon:terminate
php artisan config:cache sudo runuser -u ${{ secrets.HTTP_USER }} --php artisan config:cache
php artisan event:cache sudo runuser -u ${{ secrets.HTTP_USER }} --php artisan event:cache
php artisan route:cache sudo runuser -u ${{ secrets.HTTP_USER }} --php artisan route:cache
php artisan view:cache sudo runuser -u ${{ secrets.HTTP_USER }} --php artisan view:cache
#sudo systemctl restart php-fpm.service #sudo systemctl restart php-fpm.service
#sudo supervisorctl restart all #sudo supervisorctl restart all