Skip to content

Update hugo from 0.82.0 to 0.132.1 #68

Update hugo from 0.82.0 to 0.132.1

Update hugo from 0.82.0 to 0.132.1 #68

Workflow file for this run

name: Deploy Hugo Site
on:
push:
branches:
- preview
- main
jobs:
deploy:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
with:
submodules: true # Fetch Hugo themes (true OR recursive)
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
- uses: actions/setup-node@v2
with:
node-version: '14'
- name: Set env vars (preview)
if: endsWith(github.ref, '/preview')
run: |
echo "SITE=preview.dataone.org" >> $GITHUB_ENV
- name: Set env vars (production)
if: endsWith(github.ref, '/main')
run: |
echo "SITE=www.dataone.org" >> $GITHUB_ENV
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: "0.132.1"
extended: true
- name: Build Site
run: |
echo "Building site: ${{ env.SITE }}"
npm install
if [ "$env.SITE" = "www.dataone.org" ]; then hugo; else hugo --baseURL=https://${{ env.SITE }}; fi
- name: Deploy Site
uses: dataoneorg/[email protected]
with:
host: ${{ env.SITE }}
port: ${{ secrets.PORT }}
source: "docs/"
target: "/var/www/${{ env.SITE }}"
username: ${{ secrets.USER }}
group: ${{ secrets.GROUP }}
key: ${{ secrets.KEY }}