File tree Expand file tree Collapse file tree 1 file changed +51
-0
lines changed
Expand file tree Collapse file tree 1 file changed +51
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Deploy to Github Pages
2+
3+ on :
4+ push :
5+ branches : [main]
6+ pull_request :
7+ branches : [main]
8+
9+ jobs :
10+ build :
11+ runs-on : ubuntu-latest
12+
13+ permissions :
14+ # Give the default GITHUB_TOKEN write permission to commit and push the
15+ # added or changed files to the repository.
16+ contents : write
17+
18+ steps :
19+ - uses : actions/checkout@v4
20+ with :
21+ fetch-depth : 0
22+
23+ - name : Cache Hugo resources
24+ uses : actions/cache@v4
25+ env :
26+ cache-name : cache-hugo-resources
27+ with :
28+ path : resources
29+ key : ${{ env.cache-name }}
30+
31+ - uses : actions/setup-go@v5
32+ with :
33+ go-version : " ^1.17.0"
34+ - run : go version
35+
36+ - name : Setup Hugo
37+ uses : peaceiris/actions-hugo@v2
38+ with :
39+ hugo-version : " latest"
40+ extended : true
41+
42+ - name : Build
43+ run : hugo --minify --gc
44+
45+ - name : Deploy 🚀
46+ uses : JamesIves/github-pages-deploy-action@v4
47+ with :
48+ branch : gh-pages
49+ folder : public
50+ clean : true
51+ single-commit : true
You can’t perform that action at this time.
0 commit comments