Skip to content

Commit b9d2305

Browse files
authored
Merge pull request #202 from google/workflow/gh-pages
gh-pages workflow
2 parents 7adc837 + 22b9c08 commit b9d2305

1 file changed

Lines changed: 34 additions & 0 deletions

File tree

.github/workflows/gh-pages.yaml

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

0 commit comments

Comments
 (0)