File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Deploy docs to GitHub Pages
2+
3+ on :
4+ push :
5+ branches :
6+ - master
7+ paths :
8+ - ' docs/**'
9+ - ' gallery/**'
10+ - ' images/**'
11+ - ' .github/ci/modelslist.go'
12+ - ' .github/workflows/gh-pages.yml'
13+ workflow_dispatch :
14+
15+ permissions :
16+ contents : read
17+ pages : write
18+ id-token : write
19+
20+ concurrency :
21+ group : pages
22+ cancel-in-progress : false
23+
24+ jobs :
25+ build :
26+ runs-on : ubuntu-latest
27+ env :
28+ HUGO_VERSION : " 0.146.3"
29+ steps :
30+ - name : Checkout
31+ uses : actions/checkout@v4
32+ with :
33+ fetch-depth : 0 # needed for enableGitInfo
34+
35+ - name : Setup Go
36+ uses : actions/setup-go@v5
37+ with :
38+ go-version : ' 1.22'
39+ cache : false
40+
41+ - name : Setup Hugo
42+ uses : peaceiris/actions-hugo@v3
43+ with :
44+ hugo-version : ${{ env.HUGO_VERSION }}
45+ extended : true
46+
47+ - name : Setup Pages
48+ id : pages
49+ uses : actions/configure-pages@v5
50+
51+ - name : Generate gallery
52+ run : go run ./.github/ci/modelslist.go ./gallery/index.yaml > docs/static/gallery.html
53+
54+ - name : Build site
55+ working-directory : docs
56+ run : |
57+ mkdir -p layouts/_default
58+ hugo --minify --baseURL "${{ steps.pages.outputs.base_url }}/"
59+
60+ - name : Upload artifact
61+ uses : actions/upload-pages-artifact@v3
62+ with :
63+ path : docs/public
64+
65+ deploy :
66+ environment :
67+ name : github-pages
68+ url : ${{ steps.deployment.outputs.page_url }}
69+ runs-on : ubuntu-latest
70+ needs : build
71+ steps :
72+ - name : Deploy to GitHub Pages
73+ id : deployment
74+ uses : actions/deploy-pages@v4
Original file line number Diff line number Diff line change 1+ localai.io
You can’t perform that action at this time.
0 commit comments