Create build.yml

This commit is contained in:
Василий Толстов 2021-10-01 23:37:18 +03:00 committed by GitHub
parent 8b3b208884
commit 16721a69b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

34
.github/workflows/build.yml vendored Normal file
View File

@ -0,0 +1,34 @@
name: build
on:
push:
branches:
- master
pull_request:
jobs:
deploy:
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
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
uses: peaceiris/actions-hugo@v2
with:
hugo-version: 'latest'
# extended: true
- name: build
run: hugo --minify
- name: deploy
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.ref == 'refs/heads/master' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public