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 Demo
2+
3+ on :
4+ push :
5+ branches : [main]
6+ workflow_dispatch :
7+
8+ permissions :
9+ contents : read
10+ pages : write
11+ id-token : write
12+
13+ concurrency :
14+ group : pages
15+ cancel-in-progress : true
16+
17+ jobs :
18+ build :
19+ name : Build demo site
20+ runs-on : ubuntu-latest
21+ steps :
22+ - uses : actions/checkout@v4
23+ - uses : actions/setup-go@v5
24+ with :
25+ go-version-file : go.mod
26+ - name : Install Hugo
27+ uses : peaceiris/actions-hugo@v3
28+ with :
29+ hugo-version : " 0.145.0"
30+ extended : true
31+ - name : Build rulebound
32+ run : go build -o rulebound .
33+ - name : Create Pages config
34+ run : |
35+ cp examples/starter-package/rulebound.yml /tmp/rulebound-demo.yml
36+ sed -i 's|baseURL: /|baseURL: /rulebound/|' /tmp/rulebound-demo.yml
37+ - name : Generate demo site
38+ run : ./rulebound build examples/starter-package --output ./demo-output --config /tmp/rulebound-demo.yml
39+ - name : Upload Pages artifact
40+ uses : actions/upload-pages-artifact@v3
41+ with :
42+ path : ./demo-output
43+
44+ deploy :
45+ name : Deploy to GitHub Pages
46+ needs : build
47+ runs-on : ubuntu-latest
48+ environment :
49+ name : github-pages
50+ url : ${{ steps.deployment.outputs.page_url }}
51+ steps :
52+ - name : Deploy to GitHub Pages
53+ id : deployment
54+ uses : actions/deploy-pages@v4
You can’t perform that action at this time.
0 commit comments