Skip to content

update gh workflow

update gh workflow #95

Workflow file for this run

name: Build & Publish
on:
push:
branches: [main]
workflow_dispatch:
pull_request:
# automatically cancel previous runs on the same PR
# https://stackoverflow.com/questions/66335225/how-to-cancel-previous-runs-in-the-pr-when-you-push-new-commitsupdate-the-curre/67939898#67939898
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-22.04
steps:
- name: Setup Hugo
uses: peaceiris/actions-hugo@v3
with:
hugo-version: '0.131.0'
extended: true
- name: Build
run: hugo --minify
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Deploy to Github Pages
if: github.ref == 'refs/heads/main'
uses: JamesIves/github-pages-deploy-action@v4.2.5
with:
branch: gh-pages # The branch the action should deploy to.
folder: public # The folder the action should deploy.
clean-exclude: ".nojekyll"