-
-
Notifications
You must be signed in to change notification settings - Fork 16
/
action.yml
87 lines (87 loc) · 3.17 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
# generate-sitemap: Github action for automating sitemap generation
#
# Copyright (c) 2020-2024 Vincent A Cicirello
# https://www.cicirello.org/
#
# MIT License
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
#
name: 'generate-sitemap'
description: 'Generate an XML sitemap for a GitHub Pages site using GitHub Actions'
branding:
icon: 'book-open'
color: 'green'
inputs:
path-to-root:
description: 'The path to the root of the website'
required: false
default: '.'
base-url-path:
description: 'The url of your webpage'
required: false
default: 'https://web.address.of.your.nifty.website/'
include-html:
description: 'Indicates whether to include html files in the sitemap.'
required: false
default: true
include-pdf:
description: 'Indicates whether to include pdf files in the sitemap.'
required: false
default: true
sitemap-format:
description: 'Indicates if sitemap should be formatted in xml.'
required: false
default: 'xml'
additional-extensions:
description: 'Space separated list of additional file extensions to include in sitemap.'
required: false
default: ''
drop-html-extension:
description: 'Enables dropping .html from urls in sitemap.'
required: false
default: false
date-only:
description: 'Pass true to include only the date without the time in XML sitemaps; and false to include full date and time.'
required: false
default: false
exclude-paths:
description: 'Space separated list of paths to exclude from the sitemap.'
required: false
default: ''
outputs:
sitemap-path:
description: 'The path to the generated sitemap file.'
url-count:
description: 'The number of entries in the sitemap.'
excluded-count:
description: 'The number of html files excluded from sitemap due to noindex meta tag.'
runs:
using: 'docker'
image: 'Dockerfile'
args:
- ${{ inputs.path-to-root }}
- ${{ inputs.base-url-path }}
- ${{ inputs.include-html }}
- ${{ inputs.include-pdf }}
- ${{ inputs.sitemap-format }}
- ${{ inputs.additional-extensions }}
- ${{ inputs.drop-html-extension }}
- ${{ inputs.date-only }}
- ${{ inputs.exclude-paths }}