why the fuck would you do that
This commit is contained in:
parent
5b4369097f
commit
75eca7318b
|
@ -28,44 +28,30 @@ defaults:
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
# Build job
|
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
env:
|
|
||||||
HUGO_VERSION: 0.119.0
|
|
||||||
steps:
|
steps:
|
||||||
- name: Install Hugo CLI
|
- uses: actions/checkout@v2
|
||||||
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
|
|
||||||
run: sudo snap install dart-sass
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: true # Fetch Hugo themes (true OR recursive)
|
||||||
fetch-depth: 0
|
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
|
||||||
- name: Setup Pages
|
- name: Setup Hugo
|
||||||
id: pages
|
uses: peaceiris/actions-hugo@v2
|
||||||
uses: actions/configure-pages@v3
|
with:
|
||||||
- name: Install Node.js dependencies
|
hugo-version: 'latest'
|
||||||
run: "[[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true"
|
extended: true
|
||||||
- name: Build with Hugo
|
|
||||||
env:
|
- name: Build
|
||||||
# For maximum backward compatibility with Hugo modules
|
|
||||||
HUGO_ENVIRONMENT: production
|
|
||||||
HUGO_ENV: production
|
|
||||||
run: |
|
run: |
|
||||||
hugo \
|
hugo \
|
||||||
--gc \
|
--gc \
|
||||||
--minify \
|
--minify \
|
||||||
--baseURL "${{ steps.pages.outputs.base_url }}/"
|
--baseURL "${{ steps.pages.outputs.base_url }}/"
|
||||||
- name: Upload artifact
|
- name: Upload artifact
|
||||||
uses: actions/upload-pages-artifact@v1
|
uses: actions/upload-pages-artifact@v1
|
||||||
with:
|
with:
|
||||||
path: ./public
|
path: ./public
|
||||||
|
|
||||||
# Deployment job
|
|
||||||
deploy:
|
deploy:
|
||||||
environment:
|
environment:
|
||||||
name: github-pages
|
name: github-pages
|
||||||
|
@ -75,4 +61,4 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: Deploy to GitHub Pages
|
- name: Deploy to GitHub Pages
|
||||||
id: deployment
|
id: deployment
|
||||||
uses: actions/deploy-pages@v2
|
uses: actions/deploy-pages@v2
|
||||||
|
|
Loading…
Reference in New Issue