From 68e7d6091ad7a7b94faf084642e2fb6079bb0891 Mon Sep 17 00:00:00 2001 From: Russell Ballestrini Date: Wed, 22 Jan 2025 10:56:30 +0000 Subject: [PATCH] let gitlab-runner restart caddy service. --- .gitlab-ci.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d9f2fef..8633e56 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -116,8 +116,9 @@ deploy: # Validate the Caddyfile caddy validate --config "${CADDYFILE_DIR}/Caddyfile" - # Step 8: Reload Caddy service - - touch ~/reload_caddy # Assuming a trigger file is used to reload Caddy + # Step 8: Reload Caddy service, gitlab-runner is in sudoers. + # gitlab-runner ALL=(ALL) NOPASSWD: /bin/systemctl * caddy.service + - sudo /bin/systemctl restart caddy.service # Deployment completed - echo "Deployment completed successfully."