File tree Expand file tree Collapse file tree 2 files changed +52
-11
lines changed
Expand file tree Collapse file tree 2 files changed +52
-11
lines changed Original file line number Diff line number Diff line change 1+ name : Build and publish academy
2+
3+ on :
4+ release :
5+ types : [published]
6+
7+ workflow_dispatch :
8+ inputs :
9+ orgId :
10+ description : ' Organization ID'
11+ required : true
12+ token :
13+ description : ' Bearer token'
14+ required : true
15+ version :
16+ description : ' Module version'
17+ required : false
18+ default : ' '
19+
20+ jobs :
21+ build-and-publish :
22+ runs-on : ubuntu-latest
23+
24+ steps :
25+ - name : Checkout site
26+ uses : actions/checkout@v4
27+
28+ - name : Setup Hugo Extended
29+ uses : peaceiris/actions-hugo@v2
30+ with :
31+ hugo-version : ' 0.147.9'
32+ extended : true
33+
34+ - name : Install dependencies
35+ run : make setup
36+
37+ - name : Run production build test
38+ run : make build
39+
40+ - name : Publish to layer5 academy
41+ id : academy
42+ 43+ with :
44+ orgId : ${{ github.event.inputs.orgId || secrets.ACADEMY_ORG_ID }}
45+ token : ${{ github.event.inputs.token || secrets.ACADEMY_TOKEN }}
46+ version : ${{ github.event.inputs.version != '' && github.event.inputs.version || github.ref_name }}
47+
48+ - name : Show response
49+ run : echo "${{ steps.academy.outputs.response }}"
Original file line number Diff line number Diff line change 1414
1515# include .github/build/Makefile.show-help.mk
1616
17- # # Install docs.layer5.io dependencies on your local machine.
17+ # # Install academy-example dependencies on your local machine.
1818# # See https://gohugo.io/categories/installation
1919setup :
2020 npm install
2121
22- # # Run docs.layer5.io on your local machine with draft and future content enabled.
22+ # # Run on your local machine with draft and future content enabled.
2323site : check-go
2424 hugo server -D -F
2525
26- # # Run docs.layer5.io on your local machine. Alternate method.
27- site-fast :
28- gatsby develop
29-
30- # # Build docs.layer5.io on your local machine.
3126build :
3227 hugo
3328
34- # # Empty build cache and run docs.layer5.io on your local machine.
29+ # # Empty build cache and run on your local machine.
3530clean :
3631 hugo --cleanDestinationDir
3732 make site
@@ -42,6 +37,3 @@ check-go:
4237 @echo " Checking if Go is installed..."
4338 @command -v go > /dev/null || (echo " Go is not installed. Please install it before proceeding." ; exit 1)
4439 @echo " Go is installed."
45-
46- docker :
47- docker compose watch
You can’t perform that action at this time.
0 commit comments