Update gh-pages.yml #143
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: github pages | |
on: | |
push: | |
branches: | |
- main # Set a branch to deploy | |
workflow_dispatch: | |
jobs: | |
deploy: | |
if: ${{ contains(github.event.head_commit.message, 'build') || github.event_name == 'workflow_dispatch' }} | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 # we need fetch all to get modified (committed) date | |
# - name: Setup Python | |
# uses: actions/setup-python@v4 | |
# with: | |
# python-version: '3.9' | |
- name: Build site | |
run: bash scripts/build.sh | |
- name: Setup Hugo | |
uses: peaceiris/actions-hugo@v3 | |
with: | |
hugo-version: '0.139.4' | |
extended: true | |
- name: Build | |
run: hugo --minify --logLevel debug | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v4 | |
if: ${{ github.ref == 'refs/heads/main' }} | |
with: | |
github_token: ${{ secrets.GH_TOKEN }} | |
publish_dir: ./public |