From fdf7d11b35ab6b94d6a6fc62b5aa8d881a04278a Mon Sep 17 00:00:00 2001 From: Stefan Kalscheuer Date: Sun, 17 May 2020 21:55:27 +0200 Subject: [PATCH] add .distignore for automatic deployment control (#146) The deployment action utilizes "git archive" if no .distignore is specified. Doing so, the minified JS/CSS resources are ignored, because .gitattributes is processed for excludes, but the generated files are not actually part of git and thus won't become part of the archive. Using explicit .distignore list we now separate git / Compsoer excludes from WP deployment. This triggers simple "rsync" without git logic. --- .distignore | 20 ++++++++++++++++++++ .gitattributes | 1 + 2 files changed, 21 insertions(+) create mode 100644 .distignore diff --git a/.distignore b/.distignore new file mode 100644 index 0000000..5ddd085 --- /dev/null +++ b/.distignore @@ -0,0 +1,20 @@ +# Directories +/.git +/.github +/.wordpress-org +/node_modules +/vendor + +# Files +/.distignore +/.eslintrc.json +/.gitattributes +/.gitignore +/.stylelintrc.json +/.travis.yml +/composer.json +/package.json +/package-lock.json +/composer.lock +/phpcs.xml +/README.md diff --git a/.gitattributes b/.gitattributes index 3261b4f..74f6667 100644 --- a/.gitattributes +++ b/.gitattributes @@ -8,6 +8,7 @@ /vendor export-ignore # Files +/.distignore export-ignore /.eslintrc.json export-ignore /.gitattributes export-ignore /.gitignore export-ignore