strolch-website/.github/workflows/publish-site.yml

34 lines
782 B
YAML

name: hugo publish
on:
push:
branches:
- develop
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build-deploy:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.80.0'
- name: Build
run: hugo --minify
- name: Commit the generated website and push to git repository
run: |
git config --global user.email "dev@strolch.li"
git config --global user.name "Strolch GitHub Actions Build"
git status
git add docs/
git commit -am "[AUTO] New version of website"
git push origin HEAD:develop