aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/main.yml
blob: 84508809e93c0c1b20651364c3de830b7a26d06f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
name: Build with Hugo

on: [push]

jobs:
  hugo:
    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 ../..