Skip to content

Commit d026a65

Browse files
committed
Update deployment script
Signed-off-by: Daniel Metzner <daniel.metzner@niceshops.com>
1 parent c95d482 commit d026a65

File tree

2 files changed

+4
-12
lines changed

2 files changed

+4
-12
lines changed

.github/workflows/deployment.yaml

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@ jobs:
2121
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2222
# Deployment:
2323
#
24-
# - requires a VPN connection to the TU Graz. (SSH is only allowed inside the university network)
25-
# - a SSH connection is required (public key must be registered on server!)
24+
# - An SSH connection is required (public key must be registered on server!)
2625
# - Add all credentials hidden in secrets to the configuration files
2726
# - The current script is build within the Symfony framework, hence, the container is used to run the script.
2827
#
@@ -35,13 +34,6 @@ jobs:
3534
- name: 'Setup PHP and composer packages'
3635
uses: ./.github/actions/setup-php-composer
3736

38-
# Kept in case the VPN config switches again...
39-
# printf 'TUGraz-Angehoerige\n${{ secrets.VPN_PASSWD }}' | sudo openconnect vpn.tugraz.at --user=${{ secrets.VPN_USER }} & disown
40-
- name: Connect to TUG via VPN
41-
run: |
42-
sudo apt-get --yes --force-yes install openconnect
43-
printf '${{ secrets.VPN_PASSWD }}' | sudo openconnect vpn.tugraz.at --user=${{ secrets.VPN_USER }} & disown
44-
4537
- name: Set deployment script secrets (.env.local)
4638
run: |
4739
printf '\nDEPLOY_GIT=https://github.com/Catrobat/Catroweb-Symfony.git\n' >> .env.local

deploy.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ function loadEnvVariables(string $filename): void
8080
->set('symfony_env', 'prod')
8181
->set('branch', getenv('DEPLOY_SHARE_BRANCH'))
8282
->set('deploy_path', '/var/www/share')
83-
->set('remote_user', 'root')
83+
->set('remote_user', 'deploy')
8484
;
8585

8686
// Tasks
@@ -94,11 +94,11 @@ function loadEnvVariables(string $filename): void
9494
// For such sudo commands to work, the server must allow those commands without a password
9595
// change the sudoers file if needed!
9696
task('restart:nginx', function () {
97-
run('/usr/sbin/service nginx restart');
97+
run('sudo /usr/sbin/service nginx restart');
9898
});
9999

100100
task('restart:php-fpm', function () {
101-
run('/usr/sbin/service php8.3-fpm restart');
101+
run('sudo /usr/sbin/service php8.3-fpm restart');
102102
});
103103

104104
task('install:npm', function () {

0 commit comments

Comments
 (0)