From 766f3c6738314351e7a05e077994166cde6321c9 Mon Sep 17 00:00:00 2001 From: Ignacio de Mendizabal <75813769+imendizabal@users.noreply.github.com> Date: Tue, 25 Jun 2024 20:37:31 +0200 Subject: [PATCH] Update hugo.yml --- .github/workflows/hugo.yml | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/hugo.yml b/.github/workflows/hugo.yml index c7f74a3..ba6c48b 100644 --- a/.github/workflows/hugo.yml +++ b/.github/workflows/hugo.yml @@ -4,7 +4,8 @@ name: Deploy Hugo site to Pages on: # Runs on pushes targeting the default branch push: - branches: ["main"] + branches: + - main # Allows you to run this workflow manually from the Actions tab workflow_dispatch: @@ -43,17 +44,17 @@ jobs: uses: actions/checkout@v4 with: submodules: recursive - - name: Setup Node.js environment - uses: actions/setup-node@v2 - with: - node-version: '14' # Specify the Node.js version you need + - name: Setup Node environment + uses: actions/setup-node@v2 + with: + node-version: '14' # Specify the Node.js version you need - name: Setup Pages id: pages uses: actions/configure-pages@v5 - name: Install Node.js dependencies run: "[[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true" - name: Install PostCSS CLI - run: npm install -g postcss-cli + run: npm install -g postcss-cli - name: Build with Hugo env: # For maximum backward compatibility with Hugo modules @@ -61,9 +62,10 @@ jobs: HUGO_ENV: production run: | hugo \ + --gc \ --minify \ --baseURL "${{ steps.pages.outputs.base_url }}/" - #-s docs + -s docs - name: Upload artifact uses: actions/upload-pages-artifact@v3 with: