background image #109
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: Push | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
link-check: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Link Checker | |
uses: lycheeverse/[email protected] | |
with: | |
fail: true | |
env: | |
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true # Fetch Hugo themes (true OR recursive) | |
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod | |
- name: Setup node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '16' | |
- name: Setup Hugo | |
uses: peaceiris/actions-hugo@v3 | |
with: | |
hugo-version: 'latest' | |
extended: true | |
- name: Install dependencies | |
run: npm install | |
- name: Build | |
run: hugo --minify | |
- name: Deploy | |
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./public |