Add ftp deploy

This commit is contained in:
Simon 2020-02-16 16:44:29 +01:00
parent a8dbc19968
commit 4de21c26bc
2 changed files with 12 additions and 0 deletions

10
.htaccess Normal file
View File

@ -0,0 +1,10 @@
Errordocument 404 /404.html
RewriteEngine On
## http -> https
RewriteCond %{HTTPS} off
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
## www -> no-www
RewriteCond %{HTTP_HOST} ^www\.(.*)$
RewriteRule ^ https://%1%{REQUEST_URI} [R=301,L]

View File

@ -11,6 +11,8 @@
"build": "rm -rf public && hugo -D --minify", "build": "rm -rf public && hugo -D --minify",
"favicon": "convert static/icon.png -resize 32x32 -colors 16 \\( -clone 0 -resize 16x16 -extent 16x16 \\) \\( -clone 0 -resize 32x32 -extent 32x32 \\) -delete 0 static/favicon.ico", "favicon": "convert static/icon.png -resize 32x32 -colors 16 \\( -clone 0 -resize 16x16 -extent 16x16 \\) \\( -clone 0 -resize 32x32 -extent 32x32 \\) -delete 0 static/favicon.ico",
"deploy": "docker-compose up -d --build", "deploy": "docker-compose up -d --build",
"ftp-deploy": "lftp -u $HISTOIREDUNPIED_FTP_USER,$HISTOIREDUNPIED_FTP_PASSWORD $HISTOIREDUNPIED_FTP_HOST -e 'mirror -e -R ./public /www ; quit'",
"ftp-htaccess": "lftp -u $HISTOIREDUNPIED_FTP_USER,$HISTOIREDUNPIED_FTP_PASSWORD $HISTOIREDUNPIED_FTP_HOST -e 'put ./.htaccess ; quit'",
"test": "echo \"Error: no test specified\" && exit 1" "test": "echo \"Error: no test specified\" && exit 1"
}, },
"author": "Simon <simon@lamelio.fr>", "author": "Simon <simon@lamelio.fr>",