try it #476
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: website | ||
## https://github.com/peaceiris/actions-hugo | ||
## https://github.com/github-actions-x/hugo | ||
## https://github.com/github-actions-x/commit | ||
on: | ||
push: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: true # Fetch Hugo themes (true OR recursive) | ||
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod | ||
persist-credentials: false | ||
- name: Setup Hugo | ||
uses: peaceiris/actions-hugo@v2 | ||
with: | ||
hugo-version: '0.91.2' | ||
- name: Build | ||
working-directory: ./docs-website-src | ||
run: | | ||
hugo -D | ||
- name: check delta | ||
run: | | ||
git status | ||
git diff | ||
- name: push | ||
run: | | ||
git config --global user.name 'GitHub Action' | ||
git config --global user.email 'github.bot@cpanel.net' | ||
git add docs/ | ||
git commit -m "Regenerate Documentation Website" | ||
git remote -v | ||
git push --force |