This commit is contained in:
1 parent
60d0ae790f
commit
b0be870795
1 file changed
+4
-2
@@ -7,7 +7,6 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
deploy:
|
deploy:
|
||||||
# Target ONLY the shell label to run directly on the host VPS instead of inside a container
|
|
||||||
runs-on: shell
|
runs-on: shell
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
@@ -22,7 +21,10 @@ jobs:
|
|||||||
# 2. Navigate to your website directory
|
# 2. Navigate to your website directory
|
||||||
cd /var/www/atom-nexst/
|
cd /var/www/atom-nexst/
|
||||||
|
|
||||||
# 3. Fetch and update code using the local web user to maintain SSH permissions
|
# Fix ownership to ensure www-data owns the files before Git runs
|
||||||
|
sudo chown -R www-data:www-data .git/
|
||||||
|
|
||||||
|
# 3. Fetch and update code using the local web user
|
||||||
sudo -u www-data git fetch origin --prune
|
sudo -u www-data git fetch origin --prune
|
||||||
sudo -u www-data git reset --hard origin/main
|
sudo -u www-data git reset --hard origin/main
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user