2022-07-31 10:45:48 +00:00
|
|
|
name: github pages
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
2022-07-31 10:52:33 +00:00
|
|
|
- master # Set a branch to deploy
|
2022-07-31 10:45:48 +00:00
|
|
|
pull_request:
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
- name: Setup Hugo
|
|
|
|
uses: peaceiris/actions-hugo@v2
|
|
|
|
with:
|
|
|
|
hugo-version: 'latest'
|
2022-07-31 10:51:23 +00:00
|
|
|
extended: true
|
2022-07-31 10:45:48 +00:00
|
|
|
|
|
|
|
- name: Build
|
|
|
|
run: hugo --minify
|
|
|
|
|
|
|
|
- name: Deploy
|
|
|
|
uses: peaceiris/actions-gh-pages@v3
|
2022-07-31 10:54:54 +00:00
|
|
|
if: github.ref == 'refs/heads/master'
|
2022-07-31 10:45:48 +00:00
|
|
|
with:
|
|
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
publish_dir: ./public
|