@@ -2,41 +2,41 @@ name: Build and Deploy MkDocs Material (Reloaded)
22description : Builds and/or Deploys MkDocs Material to GitHub Pages, or a Directory
33
44inputs :
5- MKDOCS_VERSION :
5+ mkdocs-version :
66 type : string
77 required : false
88 default : " latest"
99 description : " MkDocs version to use"
10- REQUIREMENTS :
10+ requirements :
1111 type : string
1212 required : false
1313 default : " ./docs/requirements.txt"
1414 description : " Path to the requirements.txt file"
15- CONFIG_FILE :
15+ config-file :
1616 type : string
1717 required : false
1818 default : " mkdocs.yml"
1919 description : " Path to the mkdocs.yml file"
20- PUBLISH_TO_PAGES :
20+ publish-to-pages :
2121 type : boolean
2222 required : false
2323 default : true
2424 description : " Whether to publish to GitHub Pages"
25- CHECKOUT_CURRENT_REPO :
25+ checkout-current-repo :
2626 type : boolean
2727 required : false
2828 default : true
2929 description : " Whether to perform repository checkout"
30- PRE_BUILD_SCRIPT :
30+ pre-build-script :
3131 type : string
3232 required : false
3333 description : " Path to the pre-build script"
34- PRE_BUILD_SHELL :
34+ pre-build-shell :
3535 type : string
3636 required : false
3737 default : " bash"
3838 description : " Shell to use for running the pre-build script"
39- OUTPUT_DIRECTORY :
39+ output-directory :
4040 type : string
4141 required : false
4242 default : " ./site"
@@ -46,50 +46,50 @@ runs:
4646 using : " composite"
4747 steps :
4848 - name : Checkout Repository
49- if : ${{ inputs.CHECKOUT_CURRENT_REPO }}
49+ if : ${{ inputs.checkout-current-repo }}
5050 uses : actions/checkout@v4
5151 with :
5252 submodules : " recursive"
5353
5454 - name : Setup Pages
55- if : ${{ inputs.PUBLISH_TO_PAGES }}
55+ if : ${{ inputs.publish-to-pages }}
5656 id : pages
5757 uses : actions/configure-pages@v4
5858
5959 - name : Install MkDocs and Dependencies
6060 shell : bash
6161 run : |
6262 python -m pip install --upgrade pip
63- if [ "${{ inputs.MKDOCS_VERSION }}" = "latest" ]; then
63+ if [ "${{ inputs.mkdocs-version }}" = "latest" ]; then
6464 pip install mkdocs-material
6565 else
66- pip install mkdocs-material==${{ inputs.MKDOCS_VERSION }}
66+ pip install mkdocs-material==${{ inputs.mkdocs-version }}
6767 fi
68- if [ -f "${{ inputs.REQUIREMENTS }}" ]; then
69- pip install -r "${{ inputs.REQUIREMENTS }}"
68+ if [ -f "${{ inputs.requirements }}" ]; then
69+ pip install -r "${{ inputs.requirements }}"
7070 fi
7171
7272 - name : Run Pre-build Script
73- if : ${{ inputs.PRE_BUILD_SCRIPT }}
74- shell : ${{ inputs.PRE_BUILD_SHELL }}
73+ if : ${{ inputs.pre-build-script }}
74+ shell : ${{ inputs.pre-build-shell }}
7575 run : |
76- if [ -f "${{ inputs.PRE_BUILD_SCRIPT }}" ]; then
77- ${{ inputs.PRE_BUILD_SHELL }} "${{ inputs.PRE_BUILD_SCRIPT }}"
76+ if [ -f "${{ inputs.pre-build-script }}" ]; then
77+ ${{ inputs.pre-build-shell }} "${{ inputs.pre-build-script }}"
7878 fi
7979
8080 - name : Build MkDocs Site
8181 shell : bash
82- run : mkdocs build --config-file "${{ inputs.CONFIG_FILE }}" --site-dir "${{ inputs.OUTPUT_DIRECTORY }}" # Updated command
82+ run : mkdocs build --config-file "${{ inputs.config-file }}" --site-dir "${{ inputs.output-directory }}"
8383
8484 - name : Upload pages artifact
85- if : ${{ inputs.PUBLISH_TO_PAGES }}
85+ if : ${{ inputs.publish-to-pages }}
8686 uses : actions/upload-pages-artifact@v3
8787 with :
8888 name : " github-pages"
89- path : " ${{ inputs.OUTPUT_DIRECTORY }}"
89+ path : " ${{ inputs.output-directory }}"
9090
9191 - name : Deploy to GitHub Pages
92- if : ${{ inputs.PUBLISH_TO_PAGES }}
92+ if : ${{ inputs.publish-to-pages }}
9393 id : deployment
9494 uses : actions/deploy-pages@v4
9595 with :
0 commit comments