chore: update workflows #90
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 | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: main | |
token: ${{ secrets.GITHUB_TOKEN }} | |
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod | |
- name: Setup Hugo | |
uses: peaceiris/actions-hugo@v2 | |
with: | |
hugo-version: '0.128.0' | |
extended: true | |
- name: Setup public | |
run: git worktree add -B gh-pages ./exampleSite/public origin/gh-pages | |
- name: Clean public | |
run: rm -rf ./exampleSite/public/* | |
- name: Build | |
run: hugo -s exampleSite --baseURL https://kaiiiz.github.io/hugo-theme-monochrome --themesDir=../.. --minify --environment production | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v4 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./exampleSite/public | |
publish_branch: gh-pages | |