diff --git a/.github/workflows/build-site.yml b/.github/workflows/build-site.yml index bc23a5e..cc24aea 100644 --- a/.github/workflows/build-site.yml +++ b/.github/workflows/build-site.yml @@ -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 diff --git a/postcss.config.js b/postcss.config.js index d0a0b99..ecf2433 100644 --- a/postcss.config.js +++ b/postcss.config.js @@ -6,6 +6,8 @@ const purgecss = require("postcss-purgecss")({ }, }); -module.exports = { - plugins: [purgecss], -}; +if (process.env.HUGO_ENVIRONMENT === 'production') { + module.exports = { + plugins: [purgecss], + }; +}