mirror of
https://github.com/alex-shpak/hugo-book.git
synced 2024-11-29 06:30:20 +00:00
34 lines
1.1 KiB
YAML
34 lines
1.1 KiB
YAML
name: Build with Hugo
|
|
|
|
on: [push]
|
|
|
|
jobs:
|
|
hugo-latest:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@master
|
|
|
|
- name: Install Hugo
|
|
run: |
|
|
LATEST_VERSION=`curl --silent "https://api.github.com/repos/gohugoio/hugo/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/'`
|
|
VERSION_NO_PREFIX=`echo $LATEST_VERSION | cut -c 2-`
|
|
wget "https://github.com/gohugoio/hugo/releases/download/$LATEST_VERSION/hugo_extended_${VERSION_NO_PREFIX}_Linux-64bit.deb" -O /tmp/hugo.deb
|
|
sudo dpkg -i /tmp/hugo.deb
|
|
|
|
- name: Run Hugo
|
|
working-directory: exampleSite
|
|
run: hugo --themesDir ../..
|
|
hugo-minimum:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@master
|
|
|
|
- name: Install Hugo
|
|
run: |
|
|
wget "https://github.com/gohugoio/hugo/releases/download/v0.65.0/hugo_extended_0.65.0_Linux-64bit.deb" -O /tmp/hugo.deb
|
|
sudo dpkg -i /tmp/hugo.deb
|
|
|
|
- name: Run Hugo
|
|
working-directory: exampleSite
|
|
run: hugo --themesDir ../..
|