all repos — website-hugo @ 8c377b6c5ac9300fef5b584ed933c8b426b738c2

My personal blog, built with Hugo!

.github/workflows/gh-pages.yml (view raw)

 1name: github pages
 2
 3on:
 4  push:
 5    branches:
 6      - master  # Set a branch that will trigger a deployment
 7  pull_request:
 8
 9jobs:
10  deploy:
11    runs-on: ubuntu-22.04
12    steps:
13      - uses: actions/checkout@v3
14        with:
15          submodules: true  # Fetch Hugo themes (true OR recursive)
16          fetch-depth: 0    # Fetch all history for .GitInfo and .Lastmod
17
18      - name: Setup Hugo
19        uses: peaceiris/actions-hugo@v2
20        with:
21          hugo-version: 'latest'
22          # extended: true
23
24      - name: Build
25        run: hugo --minify
26
27      - name: Deploy
28        uses: peaceiris/actions-gh-pages@v3
29        if: github.ref == 'refs/heads/master'
30        with:
31          github_token: ${{ secrets.GITHUB_TOKEN }}
32          publish_branch: gh-pages
33          publish_dir: ./public