diff --git a/astro.config.mjs b/astro.config.mjs index 01f31a9..63c3059 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -62,7 +62,7 @@ export default defineConfig({ }, vite: { build: { - sourcemap: true, + sourcemap: false, }, ssr: { noExternal: ['react-component-benchmark'], diff --git a/package.json b/package.json index aae4f71..9d31b3e 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,8 @@ "lint": "eslint-config", "format": "prettier-config", "clean": "rm -rf node_modules yarn.lock", - "check-types": "tsc --noEmit --pretty" + "check-types": "tsc --noEmit --pretty", + "deploy:nginx": "bash scripts/deploy-nginx-local.sh" }, "dependencies": { "@astrojs/mdx": "^3.0.0", diff --git a/scripts/deploy-nginx-local.sh b/scripts/deploy-nginx-local.sh new file mode 100644 index 0000000..41927b7 --- /dev/null +++ b/scripts/deploy-nginx-local.sh @@ -0,0 +1,31 @@ +#!/bin/bash + +# Navigate to the website folder on the remote server and clear contents of the website folder +ssh arm1 'cd ~/traefik-proxy/apps/nmc-nginx-with-volume/website && \ + echo "Listing files before clearing:" && \ + echo "List before clearing:" && \ + ls && \ + echo "Count before clearing:" && \ + ls -l | grep -v ^l | wc -l && \ + echo "Clearing contents of the folder..." && \ + rm -rf * && \ + echo "List after clearing:" && \ + ls && \ + echo "Count after clearing:" && \ + ls -l | grep -v ^l | wc -l && \ + echo "Copying new contents..."' + +# Copy new contents +scp -rq ./dist/* arm1:~/traefik-proxy/apps/nmc-nginx-with-volume/website +# rsync -az --progress ./dist/* arm1:~/traefik-proxy/apps/nmc-nginx-with-volume/website + + +# List all files after copying +ssh arm1 'cd ~/traefik-proxy/apps/nmc-nginx-with-volume/website && \ + echo "List after copying:" && \ + ls && \ + echo "Count after copying:" && \ + ls -l | grep -v ^l | wc -l' + + +