From 5195a65ca58b192f620a6b705e91607c84c6f99c Mon Sep 17 00:00:00 2001 From: asepharyana Date: Sat, 22 Aug 2026 12:08:20 +0700 Subject: [PATCH] ci: use sudo when syncing .next on VPS --- .github/workflows/ci.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c9a75e7..0f7a530 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -304,9 +304,6 @@ jobs: VPS_HOST: ${{ secrets.SSH_DEPLOY_HOST }} VPS_USER: ${{ secrets.SSH_DEPLOY_USER }} run: | - # Substitute from Attic cache (fast) - ssh "$VPS_USER@$VPS_HOST" \ - "sudo /nix/var/nix/profiles/default/bin/nix-store --realise '$STORE_PATH'" # Update profile + sync git repo + sync .next + restart ssh "$VPS_USER@$VPS_HOST" \ "sudo /nix/var/nix/profiles/default/bin/nix-store --realise '$STORE_PATH' && \ @@ -314,8 +311,8 @@ jobs: --profile /nix/var/nix/profiles/mcpedia-web \ --set '$STORE_PATH' && \ (cd /home/code/mcpedia && git fetch origin main && git reset --hard origin/main) && \ - rm -rf /home/code/mcpedia/apps/web/.next && \ - cp -r '$STORE_PATH/share/mcpedia-web/.next' /home/code/mcpedia/apps/web/.next && \ + sudo rm -rf /home/code/mcpedia/apps/web/.next && \ + sudo cp -r '$STORE_PATH/share/mcpedia-web/.next' /home/code/mcpedia/apps/web/.next && \ sudo systemctl restart mcpedia-web && \ sleep 3 && \ sudo systemctl status mcpedia-web --no-pager --no-legend | head -5"