Build & Deploy #8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build & Deploy | |
on: | |
push: | |
branches: [ "main" ] | |
# pull_request: | |
# branches: [ "main" ] | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
HUGO_VERSION: 0.102.3 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Install Hugo CLI | |
run: | | |
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_Linux-64bit.deb \ | |
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb | |
- name: Build with Hugo | |
env: | |
# For maximum backward compatibility with Hugo modules | |
HUGO_ENVIRONMENT: production | |
HUGO_ENV: production | |
run: hugo | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v1 | |
with: | |
path: ./public |