Skip to content

Commit 78be8db

Browse files
committed
Changed: Migrated Script to Common Lowercase and Dashes
1 parent 621e712 commit 78be8db

3 files changed

Lines changed: 35 additions & 35 deletions

File tree

.github/workflows/test-mkdocs-workflow.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,5 @@ jobs:
3131
- name: Deploy MkDocs
3232
uses: Reloaded-Project/devops-mkdocs@v1
3333
with:
34-
REQUIREMENTS: docs/requirements.txt
35-
CHECKOUT_CURRENT_REPO: false
34+
requirements: docs/requirements.txt
35+
checkout-current-repo: false

README.MD

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ jobs:
4343
- name: Deploy MkDocs
4444
uses: Reloaded-Project/devops-mkdocs@v1
4545
with:
46-
REQUIREMENTS: ./docs/requirements.txt
47-
PUBLISH_TO_PAGES: true
48-
CHECKOUT_CURRENT_REPO: true # Checks out by default.
46+
requirements: ./docs/requirements.txt
47+
publish-to-pages: true
48+
checkout-current-repo: true # Checks out by default.
4949
```
5050
5151
## Setup
@@ -65,14 +65,14 @@ repository (or update the `CONFIG_FILE` parameter in the workflow).
6565

6666
The action supports the following input parameters:
6767

68-
- `MKDOCS_VERSION`: (Optional) The version of MkDocs to use. Defaults to `latest`. This corresponds to the version in the Python package index.
69-
- `REQUIREMENTS`: (Optional) The path to a `requirements.txt` file listing additional Python dependencies. Defaults to `./docs/requirements.txt`.
70-
- `CONFIG_FILE`: (Optional) The path to your MkDocs configuration file. Defaults to `mkdocs.yml` in the repository root.
71-
- `PUBLISH_TO_PAGES`: (Optional) Whether to publish the generated site to GitHub Pages. Defaults to `true`.
72-
- `CHECKOUT_CURRENT_REPO`: (Optional) Whether to perform a repository checkout before building the site. Defaults to `true`.
73-
- `OUTPUT_DIRECTORY`: (Optional) Location of the built MkDocs site. Defaults to `./site`.
74-
- `PRE_BUILD_SCRIPT`: (Optional) The path to a pre-build script to run before building the site.
75-
- `PRE_BUILD_SHELL`: (Optional) The shell to use for running the pre-build script. Defaults to `bash`.
68+
- `mkdocs-version`: (Optional) The version of MkDocs to use. Defaults to `latest`. This corresponds to the version in the Python package index.
69+
- `requirements`: (Optional) The path to a `requirements.txt` file listing additional Python dependencies. Defaults to `./docs/requirements.txt`.
70+
- `config-file`: (Optional) The path to your MkDocs configuration file. Defaults to `mkdocs.yml` in the repository root.
71+
- `publish-to-pages`: (Optional) Whether to publish the generated site to GitHub Pages. Defaults to `true`.
72+
- `checkout-current-repo`: (Optional) Whether to perform a repository checkout before building the site. Defaults to `true`.
73+
- `output-directory`: (Optional) Location of the built MkDocs site. Defaults to `./site`.
74+
- `pre-build-script`: (Optional) The path to a pre-build script to run before building the site.
75+
- `pre-build-shell`: (Optional) The shell to use for running the pre-build script. Defaults to `bash`.
7676

7777
### Workflow Triggers
7878

action.yml

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,41 +2,41 @@ name: Build and Deploy MkDocs Material (Reloaded)
22
description: Builds and/or Deploys MkDocs Material to GitHub Pages, or a Directory
33

44
inputs:
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

Comments
 (0)