2020-08-31 13:40:11 +00:00
|
|
|
name: CI
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-18.04
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
2021-05-13 08:12:30 +00:00
|
|
|
uses: actions/checkout@v2.3.4
|
2020-08-31 13:40:11 +00:00
|
|
|
|
|
|
|
- name: Setup Hugo
|
2021-05-28 15:47:49 +00:00
|
|
|
uses: peaceiris/actions-hugo@v2.5.0
|
2020-08-31 13:40:11 +00:00
|
|
|
with:
|
|
|
|
hugo-version: latest
|
|
|
|
|
|
|
|
- name: Build local ./exampleSite
|
|
|
|
run: hugo --minify --gc --destination ../public --source ./exampleSite --themesDir ../.. --baseURL https://janraasch.github.io/hugo-bearblog/
|
|
|
|
|
|
|
|
- name: Deploy to GitHub Pages
|
|
|
|
if: github.event_name == 'push'
|
2021-03-26 08:55:16 +00:00
|
|
|
uses: peaceiris/actions-gh-pages@v3.8.0
|
2020-08-31 13:40:11 +00:00
|
|
|
with:
|
|
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
publish_dir: ./public
|