From 22d917891e137a461f6f3988e0f85161edfa4aa7 Mon Sep 17 00:00:00 2001 From: Kazuhiro MUSASHI Date: Sun, 15 Jan 2023 21:48:58 +0900 Subject: [PATCH 1/2] Change the prodcution URL to `www.everun.club`. --- config/_default/config.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/_default/config.toml b/config/_default/config.toml index b193dfb..2e83094 100644 --- a/config/_default/config.toml +++ b/config/_default/config.toml @@ -3,7 +3,7 @@ # https://blowfish.page/docs/getting-started/ theme = "blowfish" -baseURL = "https://everun.club/" +baseURL = "https://www.everun.club/" defaultContentLanguage = "ja" hasCJKLanguage = true From eee4ba7caf1a0dcc4e2b4518db88f5a37057d07f Mon Sep 17 00:00:00 2001 From: Kazuhiro MUSASHI Date: Sun, 15 Jan 2023 21:49:00 +0900 Subject: [PATCH 2/2] Make `Rake` task for production. --- tasks/production.rake | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 tasks/production.rake diff --git a/tasks/production.rake b/tasks/production.rake new file mode 100755 index 0000000..bb0fb82 --- /dev/null +++ b/tasks/production.rake @@ -0,0 +1,18 @@ +#!/usr/bin/env rake + +require 'find' + +desc 'Deploy the hugo contents to the server' +task :prod => [ :prep ] do + sh 'hugo -e production -v --minify' + + sh 'find public -type f -name "*.gz" -delete' + + sh 'find public/ -type f | egrep "\.(css|js|png|jpg|html|JPG|PNG|CSS|JS|HTML)$" | xargs -n 1 -i% -P 0 sh -c "cp % %.bk && gzip % && mv %.bk %"' + + sh 'ssh -p 10022 webadm@10.0.1.166 "rm -rf /var/www/everun/*"' + sh 'rsync -e "ssh -p 10022" -rltvz --omit-dir-times --delete public/ webadm@10.0.1.166:/var/www/everun' + + sh 'ssh -p 10022 webadm@10.0.1.166 "rm -rf /home/webadm/works/everun/*"' + sh 'rsync -e "ssh -p 10022" -rltvz --omit-dir-times --delete public/ webadm@10.0.1.166:/home/webadm/works/everun' +end