12
12
revision_mark :
13
13
description : ' Set revision mark as Draft, Release or Stable:'
14
14
required : true
15
- type : string
15
+ type : choice
16
+ options :
17
+ - Draft
18
+ - Release
19
+ - Stable
16
20
default : Draft
17
21
prerelease :
18
22
description : Tag as a pre-release?
@@ -39,24 +43,28 @@ jobs:
39
43
runs-on : ubuntu-latest
40
44
41
45
steps :
42
- # Checkout the repository
46
+ # Checkout the repository
43
47
- name : Checkout repository
44
48
uses : actions/checkout@v4
45
49
with :
46
50
submodules : recursive
47
51
48
- # Pull the latest RISC-V Docs container image
52
+ # Pull the latest RISC-V Docs container image
49
53
- name : Pull Container
50
54
run : docker pull riscvintl/riscv-docs-base-container-image:latest
51
55
52
- # Build PDF and HTML.
56
+ # Override VERSION and REVMARK for manual workflow dispatch
57
+ - name : Update environment variables
58
+ run : |
59
+ echo "VERSION=v${{ github.event.inputs.version }}" >> "$GITHUB_ENV"
60
+ echo "REVMARK=${{ github.event.inputs.revision_mark }}" >> "$GITHUB_ENV"
61
+ if : github.event_name == 'workflow_dispatch'
62
+
63
+ # Build PDF and HTML.
53
64
- name : Build Files
54
65
run : make all
55
- env :
56
- VERSION : v${{ github.event.inputs.version }}
57
- REVMARK : ${{ github.event.inputs.revision_mark }}
58
66
59
- # Upload the built PDF and HTML files as a single artifact
67
+ # Upload the built PDF and HTML files as a single artifact
60
68
- name : Upload Build Artifacts
61
69
uses : actions/upload-artifact@v3
62
70
with :
66
74
build/*.html
67
75
retention-days : 30
68
76
69
- # Upload gitlab pages artefact .
77
+ # Upload GitHub pages artefacts .
70
78
- name : Make gitlab pages directory
71
79
run : mkdir dist && cp build/*.html dist/index.html
72
80
if : github.event_name == 'workflow_dispatch'
77
85
path : dist
78
86
if : github.event_name == 'workflow_dispatch'
79
87
80
- # Create Release
88
+ # Create Release
81
89
- name : Create Release
82
90
uses : softprops/action-gh-release@v1
83
91
with :
91
99
env :
92
100
GITHUB_TOKEN : ${{ secrets.GHTOKEN }}
93
101
if : github.event_name == 'workflow_dispatch'
94
- # This condition ensures this step only runs for workflow_dispatch events.
102
+ # This condition ensures this step only runs for workflow_dispatch events.
95
103
96
104
# Deploy HTML to Github pages.
97
105
deploy :
0 commit comments