Switch to purging css only in production
Signed-off-by: Thomas A. Christensen II <25492070+MillironX@users.noreply.github.com>
This commit is contained in:
parent
6bbec3fac9
commit
212caea3c4
2 changed files with 6 additions and 4 deletions
2
.github/workflows/build-site.yml
vendored
2
.github/workflows/build-site.yml
vendored
|
@ -32,7 +32,7 @@ jobs:
|
|||
npm install
|
||||
- name: Run Hugo
|
||||
run: |
|
||||
hugo
|
||||
hugo --environment production --minify
|
||||
- name: Deploy to gh-pages
|
||||
if: ${{ !env.ACT }}
|
||||
uses: rdarida/simple-github-pages-deploy-action@v1
|
||||
|
|
|
@ -6,6 +6,8 @@ const purgecss = require("postcss-purgecss")({
|
|||
},
|
||||
});
|
||||
|
||||
module.exports = {
|
||||
plugins: [purgecss],
|
||||
};
|
||||
if (process.env.HUGO_ENVIRONMENT === 'production') {
|
||||
module.exports = {
|
||||
plugins: [purgecss],
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue