2020-07-09 08:24:55 +00:00
|
|
|
name: CI
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
2020-09-09 16:00:59 +00:00
|
|
|
- master
|
2020-07-09 08:24:55 +00:00
|
|
|
pull_request:
|
|
|
|
branches:
|
2020-09-09 16:00:59 +00:00
|
|
|
- master
|
2020-07-09 08:24:55 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-18.04
|
|
|
|
|
|
|
|
steps:
|
2020-09-09 16:00:59 +00:00
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
2020-07-09 08:24:55 +00:00
|
|
|
|
2020-09-09 16:00:59 +00:00
|
|
|
- name: Setup Hugo
|
|
|
|
uses: peaceiris/actions-hugo@v2
|
|
|
|
with:
|
|
|
|
hugo-version: latest
|
2020-07-09 08:45:01 +00:00
|
|
|
|
2020-09-09 16:00:59 +00:00
|
|
|
- name: Build local ./exampleSite
|
|
|
|
run: hugo --minify --gc --destination ../public --source ./exampleSite --themesDir ../.. --baseURL https://janraasch.github.io/hugo-scroll/
|
2020-07-09 08:45:01 +00:00
|
|
|
|
2020-09-09 16:00:59 +00:00
|
|
|
- name: Deploy to GitHub Pages
|
|
|
|
if: github.event_name == 'push'
|
|
|
|
uses: peaceiris/actions-gh-pages@v3
|
|
|
|
with:
|
|
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
publish_dir: ./public
|