Skip to content

Commit

Permalink
fix: hugo workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
dlvhdr committed May 4, 2023
1 parent 46d4406 commit 3a67f15
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions .github/workflows/hugo.yaml
Expand Up @@ -38,36 +38,43 @@ jobs:
run: |
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb
- name: Install Dart Sass Embedded
run: sudo snap install dart-sass-embedded

- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 0

- name: Setup Pages
id: pages
uses: actions/configure-pages@v3

- name: Install Node.js dependencies
run: "[[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true"

- name: Setup Hugo modules
working-directory: ./docs
run: hugo mod get -u
working-directory: ./docs

- name: Build with Hugo
env:
# For maximum backward compatibility with Hugo modules
HUGO_ENVIRONMENT: production
HUGO_ENV: production
working-directory: ./docs
run: |
hugo \
--gc \
--minify \
--baseURL "${{ steps.pages.outputs.base_url }}/"
working-directory: ./docs

- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: ./public
path: ./docs/public

# Deployment job
deploy:
Expand Down

0 comments on commit 3a67f15

Please sign in to comment.