From 28d155196ef48e0e6816a598cd460aa2f94ac08f Mon Sep 17 00:00:00 2001 From: Firq Date: Thu, 16 Mar 2023 22:38:58 +0100 Subject: [PATCH] unlisted directories, deleting data folder after build --- .gitlab-ci.yml | 2 +- serve.json | 1 + src/pages/404.astro | 16 ++++++++++++++++ 3 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 src/pages/404.astro diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b3cca86..1b6a55a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -17,7 +17,7 @@ deploy-site: script: - echo "Connecting to proxmox machine" - - ssh $DEPLOY_USER@$DEPLOY_HOST -o StrictHostKeyChecking=no IdentitiesOnly=yes "screen -X -S website-firq-npx kill; rm -r -f public/*; cd build; git reset --hard; git pull; rm -r -f node_modules; npm install; npm run build; cp -R public ~; cp serve.json ~/public; cd ~; screen -S website-firq-npx -dm npx serve public/ -p 9000 -c serve.json" + - ssh $DEPLOY_USER@$DEPLOY_HOST -o StrictHostKeyChecking=no IdentitiesOnly=yes "screen -X -S website-firq-npx kill; rm -r -f public/*; cd build; git reset --hard; git pull; rm -r -f node_modules; npm install; npm run build; rm -r public/assets/data/; cp -R public ~; cp serve.json ~/public; cd ~; screen -S website-firq-npx -dm npx serve public/ -p 9000 -c serve.json" success_notification: stage: notification diff --git a/serve.json b/serve.json index d805fc0..acf34e5 100644 --- a/serve.json +++ b/serve.json @@ -1,4 +1,5 @@ { + "directoryListing": ["/!assets/**"], "headers": [ { "source": "**/*.@(jpg|jpeg|gif|png|webp)", diff --git a/src/pages/404.astro b/src/pages/404.astro new file mode 100644 index 0000000..23bdefc --- /dev/null +++ b/src/pages/404.astro @@ -0,0 +1,16 @@ +--- +import Layout from '../layouts/Layout.astro' +import BaseSection from '../layouts/baseSection.astro' + +const description = "Error. This shouldn't happen :/" +--- + + + + + +