File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77 pull_request :
88 branches : [ "main" ]
99
10+ workflow_dispatch :
11+ inputs :
12+ generate_documentation :
13+ description : Generate documentation
14+ required : false
15+ type : boolean
16+ default : false
17+
1018env :
1119 CARGO_TERM_COLOR : always
1220
21+ permissions :
22+ contents : read
23+ pages : write
24+ id-token : write
25+
1326jobs :
1427 build :
1528 runs-on : ubuntu-latest
4659
4760 - name : Run tests
4861 run : cargo test --verbose
62+
63+ - name : Generate documentation (on demand)
64+ if : github.event_name == 'workflow_dispatch' && inputs.generate_documentation
65+ run : cargo doc --workspace --no-deps --verbose
66+
67+ - name : Configure GitHub Pages
68+ if : github.event_name == 'workflow_dispatch' && inputs.generate_documentation
69+ uses : actions/configure-pages@v5
70+
71+ - name : Upload documentation to GitHub Pages
72+ if : github.event_name == 'workflow_dispatch' && inputs.generate_documentation
73+ uses : actions/upload-pages-artifact@v3
74+ with :
75+ path : target/doc
76+
77+ deploy-documentation :
78+ if : github.event_name == 'workflow_dispatch' && inputs.generate_documentation
79+ needs : build
80+ runs-on : ubuntu-latest
81+
82+ environment :
83+ name : github-pages
84+ url : ${{ steps.deployment.outputs.page_url }}
85+
86+ steps :
87+ - name : Deploy documentation to GitHub Pages
88+ id : deployment
89+ uses : actions/deploy-pages@v4
You can’t perform that action at this time.
0 commit comments