ci: use sudo when syncing .next on VPS
CI / typecheck + tests (push) Canceled after 0s
CI / build + deploy (Nix) — api (push) Canceled after 0s
CI / build + deploy (Nix) — mcp (push) Canceled after 0s
CI / build + deploy (Nix) — worker (push) Canceled after 0s
CI / build + deploy (web) (push) Canceled after 0s
CI / typecheck + tests (push) Canceled after 0s
CI / build + deploy (Nix) — api (push) Canceled after 0s
CI / build + deploy (Nix) — mcp (push) Canceled after 0s
CI / build + deploy (Nix) — worker (push) Canceled after 0s
CI / build + deploy (web) (push) Canceled after 0s
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user